Commit a1b2289
android: binder: drop lru lock in isolate callback
Drop the global lru lock in isolate callback before calling
zap_page_range which calls cond_resched, and re-acquire the global lru
lock before returning. Also change return code to LRU_REMOVED_RETRY.
Use mmput_async when fail to acquire mmap sem in an atomic context.
Fix "BUG: sleeping function called from invalid context"
errors when CONFIG_DEBUG_ATOMIC_SLEEP is enabled.
Also restore mmput_async, which was initially introduced in commit
ec8d7c1 ("mm, oom_reaper: do not mmput synchronously from the oom
reaper context"), and was removed in commit 2129258 ("mm: oom: let
oom_reap_task and exit_mmap run concurrently").
Link: http://lkml.kernel.org/r/[email protected]
Fixes: f2517eb ("android: binder: Add global lru shrinker to binder")
Signed-off-by: Sherry Yang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reported-by: Kyle Yan <[email protected]>
Acked-by: Arve Hjønnevåg <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Martijn Coenen <[email protected]>
Cc: Todd Kjos <[email protected]>
Cc: Riley Andrews <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Hoeun Ryu <[email protected]>
Cc: Christopher Lameter <[email protected]>
Cc: Vegard Nossum <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>1 parent 3f2eb02 commit a1b2289
3 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
916 | 917 | | |
917 | 918 | | |
918 | 919 | | |
| |||
923 | 924 | | |
924 | 925 | | |
925 | 926 | | |
926 | | - | |
| 927 | + | |
| 928 | + | |
927 | 929 | | |
928 | 930 | | |
929 | 931 | | |
930 | 932 | | |
931 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
932 | 938 | | |
| 939 | + | |
933 | 940 | | |
934 | 941 | | |
935 | | - | |
| 942 | + | |
936 | 943 | | |
937 | 944 | | |
938 | 945 | | |
| |||
950 | 957 | | |
951 | 958 | | |
952 | 959 | | |
953 | | - | |
954 | | - | |
| 960 | + | |
955 | 961 | | |
956 | | - | |
| 962 | + | |
957 | 963 | | |
958 | 964 | | |
959 | | - | |
| 965 | + | |
960 | 966 | | |
961 | 967 | | |
962 | 968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
949 | 967 | | |
950 | 968 | | |
951 | 969 | | |
| |||
0 commit comments