mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
memcg: fix oops in mem_cgroup_shrink_usage
Got an oops in mem_cgroup_shrink_usage() when testing loop over tmpfs: yes, of course, loop0 has no mm: other entry points check but this didn't. Signed-off-by: Hugh Dickins <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Balbir Singh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3ee1062b4e
commit
9623e078c1
1 changed files with 2 additions and 0 deletions
|
|
@ -796,6 +796,8 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask)
|
|||
|
||||
if (mem_cgroup_subsys.disabled)
|
||||
return 0;
|
||||
if (!mm)
|
||||
return 0;
|
||||
|
||||
rcu_read_lock();
|
||||
mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
|
||||
|
|
|
|||
Loading…
Reference in a new issue