android_kernel_motorola_sm6375/drivers/android
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tetsuo Handa 93f1e16af4 binder: Don't use mmput() from shrinker function.
commit f867c771f98891841c217fa8459244ed0dd28921 upstream.

syzbot is reporting that mmput() from shrinker function has a risk of
deadlock [1], for delayed_uprobe_add() from update_ref_ctr() calls
kzalloc(GFP_KERNEL) with delayed_uprobe_lock held, and
uprobe_clear_state() from __mmput() also holds delayed_uprobe_lock.

Commit a1b2289cef ("android: binder: drop lru lock in isolate
callback") replaced mmput() with mmput_async() in order to avoid sleeping
with spinlock held. But this patch replaces mmput() with mmput_async() in
order not to start __mmput() from shrinker context.

[1] https://syzkaller.appspot.com/bug?id=bc9e7303f537c41b2b0cc2dfcea3fc42964c2d45

Reported-by: syzbot <[email protected]>
Reported-by: syzbot <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Acked-by: Todd Kjos <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Cc: stable <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-07-29 10:18:41 +02:00
..
binder.c binder: fix null deref of proc->context 2020-06-30 15:36:48 -04:00
binder_alloc.c binder: Don't use mmput() from shrinker function. 2020-07-29 10:18:41 +02:00
binder_alloc.h
binder_alloc_selftest.c
binder_internal.h
binder_trace.h
binderfs.c binderfs: use refcount for binder control devices too 2020-03-25 08:25:50 +01:00
Kconfig
Makefile