This got lost during the rebase. --- >From cb16205a71c29d80425922cfc584373eb14b018e Mon Sep 17 00:00:00 2001 From: Michal Hocko <mhocko@xxxxxxxx> Date: Tue, 31 May 2016 07:16:12 +0200 Subject: [PATCH] fold me "mm, oom_adj: make sure processes sharing mm have same view of oom_score_adj" - skip over same thread group - skip over kernel threads and global init Signed-off-by: Michal Hocko <mhocko@xxxxxxxx> --- fs/proc/base.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index f4fcd2954f42..164fe38022d2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1104,8 +1104,11 @@ static int __set_oom_adj(struct file *file, int oom_adj, bool legacy) rcu_read_lock(); for_each_process(p) { - /* do not touch kernel threads */ - if (p->flags & PF_KTHREAD) + if (same_thread_group(task,p)) + continue; + + /* do not touch kernel threads or the global init */ + if (p->flags & PF_KTHREAD || is_global_init(p)) continue; task_lock(p); -- 2.8.1 -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>