FROMLIST: binder: protect against two threads freeing buffer
authorTodd Kjos <tkjos@google.com>
Fri, 21 Apr 2017 21:32:11 +0000 (14:32 -0700)
committerTodd Kjos <tkjos@google.com>
Thu, 13 Jul 2017 15:13:19 +0000 (15:13 +0000)
commitdb51658467e03c756b7de23eb03ebeb63e607d4c
tree796f95460e9013a17bb248ace0b50561d816e6c1
parentce9b7747d6a1cb1b4b772b4e2c524ba1a56b551b
FROMLIST: binder: protect against two threads freeing buffer

(from https://patchwork.kernel.org/patch/9817815/)

Adds protection against malicious user code freeing
the same buffer at the same time which could cause
a crash. Cannot happen under normal use.

Bug: 36650912
Change-Id: I43e078cbf31c0789aaff5ceaf8f1a94c75f79d45
Test: tested manually
Signed-off-by: Todd Kjos <tkjos@google.com>
drivers/android/binder.c
drivers/android/binder_alloc.c
drivers/android/binder_alloc.h