diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-06-05 01:07:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 01:54:03 +0200 |
commit | f87fb599ae4d2a152a93f9821b94f3158146d097 (patch) | |
tree | 8b64fc4a17246ab6988d7f09c18ee4f0af6b51e4 /mm | |
parent | mm/memblock.c: use PFN_DOWN (diff) | |
download | linux-f87fb599ae4d2a152a93f9821b94f3158146d097.tar.xz linux-f87fb599ae4d2a152a93f9821b94f3158146d097.zip |
memcg: mm_update_next_owner() should skip kthreads
"Search through everything else" in mm_update_next_owner() can hit a
kthread which adopted this "mm" via use_mm(), it should not be used as
mm->owner. Add the PF_KTHREAD check.
While at it, change this code to use for_each_process_thread() instead
of deprecated do_each_thread/while_each_thread.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Peter Chiang <pchiang@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions