From: akpm@linux-foundation.org Subject: [merged] freezer-oom-check-tif_memdie-on-the-correct-task.patch removed from -mm tree Date: Fri, 29 Jul 2016 11:54:18 -0700 Message-ID: <579ba65a.rR57u/uKRsXpfp1M%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:37049 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbcG2SyT (ORCPT ); Fri, 29 Jul 2016 14:54:19 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mhocko@suse.com, miaox@cn.fujitsu.com, miaoxie@huawei.com, rientjes@google.com, rjw@rjwysocki.net, mm-commits@vger.kernel.org The patch titled Subject: freezer, oom: check TIF_MEMDIE on the correct task has been removed from the -mm tree. Its filename was freezer-oom-check-tif_memdie-on-the-correct-task.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Michal Hocko Subject: freezer, oom: check TIF_MEMDIE on the correct task freezing_slow_path() is checking TIF_MEMDIE to skip OOM killed tasks. It is, however, checking the flag on the current task rather than the given one. This is really confusing because freezing() can be called also on !current tasks. It would end up working correctly for its main purpose because __refrigerator will be always called on the current task so the oom victim will never get frozen. But it could lead to surprising results when a task which is freezing a cgroup got oom killed because only part of the cgroup would get frozen. This is highly unlikely but worth fixing as the resulting code would be more clear anyway. Link: http://lkml.kernel.org/r/1467029719-17602-2-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: David Rientjes Cc: Miao Xie Cc: Miao Xie Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton --- kernel/freezer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/freezer.c~freezer-oom-check-tif_memdie-on-the-correct-task kernel/freezer.c --- a/kernel/freezer.c~freezer-oom-check-tif_memdie-on-the-correct-task +++ a/kernel/freezer.c @@ -42,7 +42,7 @@ bool freezing_slow_path(struct task_stru if (p->flags & (PF_NOFREEZE | PF_SUSPEND_TASK)) return false; - if (test_thread_flag(TIF_MEMDIE)) + if (test_tsk_thread_flag(p, TIF_MEMDIE)) return false; if (pm_nosig_freezing || cgroup_freezing(p)) _ Patches currently in -mm which might be from mhocko@suse.com are