diff options
-rw-r--r-- | mm/oom_kill.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index f255eda693b0..beb592fe9389 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -423,7 +423,7 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask) | |||
423 | struct task_struct *p; | 423 | struct task_struct *p; |
424 | 424 | ||
425 | cgroup_lock(); | 425 | cgroup_lock(); |
426 | rcu_read_lock(); | 426 | read_lock(&tasklist_lock); |
427 | retry: | 427 | retry: |
428 | p = select_bad_process(&points, mem); | 428 | p = select_bad_process(&points, mem); |
429 | if (PTR_ERR(p) == -1UL) | 429 | if (PTR_ERR(p) == -1UL) |
@@ -436,7 +436,7 @@ retry: | |||
436 | "Memory cgroup out of memory")) | 436 | "Memory cgroup out of memory")) |
437 | goto retry; | 437 | goto retry; |
438 | out: | 438 | out: |
439 | rcu_read_unlock(); | 439 | read_unlock(&tasklist_lock); |
440 | cgroup_unlock(); | 440 | cgroup_unlock(); |
441 | } | 441 | } |
442 | #endif | 442 | #endif |