]> git.baikalelectronics.ru Git - kernel.git/commit
android: binder: Don't get mm from task
authorSherry Yang <sherryy@android.com>
Sat, 21 Oct 2017 00:58:58 +0000 (20:58 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2017 08:14:20 +0000 (10:14 +0200)
commit9f3649922f7069462646c708f97e2b0ff14c61c0
tree0104ebfb31019168be252bc006e4689674cd8dcf
parentcf0d7a9c5103a539cd5e4c8b837bcab965f2c533
android: binder: Don't get mm from task

Use binder_alloc struct's mm_struct rather than getting
a reference to the mm struct through get_task_mm to
avoid a potential deadlock between lru lock, task lock and
dentry lock, since a thread can be holding the task lock
and the dentry lock while trying to acquire the lru lock.

Acked-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder_alloc.c
drivers/android/binder_alloc.h