From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: bug in memcg oom-killer results in a hung syscall in another process in the same cgroup Date: Tue, 12 Jul 2016 18:52:16 +0200 Message-ID: <20160712165215.GB4557@redhat.com> References: <20160711064150.GB5284@dhcp22.suse.cz> <20160712071927.GD14586@dhcp22.suse.cz> <57851224.2020902@yandex-team.ru> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <57851224.2020902@yandex-team.ru> Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Konstantin Khlebnikov Cc: Shayan Pooya , Michal Hocko , koct9i@gmail.com, cgroups mailinglist , LKML , linux-mm@kvack.org On 07/12, Konstantin Khlebnikov wrote: > > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -2808,8 +2808,9 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev) > balance_callback(rq); > preempt_enable(); > > - if (current->set_child_tid) > - put_user(task_pid_vnr(current), current->set_child_tid); > + if (current->set_child_tid && > + put_user(task_pid_vnr(current), current->set_child_tid)) > + force_sig(SIGSEGV, current); > } > > Add Oleg into CC. IIRR he had some ideas how to fix this. =) Heh. OK, OK, thank you Konstantin ;) I'll try to recall tomorrow, but iirc I only have some ideas of how we can happily blame the FAULT_FLAG_USER logic. d, in this particular case, perhaps glibc/set_child_tid too because (again, iirc) it would nice to simply kill it, it is only used for some sanity checks... Oleg. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755796AbcGLQv6 (ORCPT ); Tue, 12 Jul 2016 12:51:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58489 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755353AbcGLQvy (ORCPT ); Tue, 12 Jul 2016 12:51:54 -0400 Date: Tue, 12 Jul 2016 18:52:16 +0200 From: Oleg Nesterov To: Konstantin Khlebnikov Cc: Shayan Pooya , Michal Hocko , koct9i@gmail.com, cgroups mailinglist , LKML , linux-mm@kvack.org Subject: Re: bug in memcg oom-killer results in a hung syscall in another process in the same cgroup Message-ID: <20160712165215.GB4557@redhat.com> References: <20160711064150.GB5284@dhcp22.suse.cz> <20160712071927.GD14586@dhcp22.suse.cz> <57851224.2020902@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57851224.2020902@yandex-team.ru> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 12 Jul 2016 16:51:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12, Konstantin Khlebnikov wrote: > > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -2808,8 +2808,9 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev) > balance_callback(rq); > preempt_enable(); > > - if (current->set_child_tid) > - put_user(task_pid_vnr(current), current->set_child_tid); > + if (current->set_child_tid && > + put_user(task_pid_vnr(current), current->set_child_tid)) > + force_sig(SIGSEGV, current); > } > > Add Oleg into CC. IIRR he had some ideas how to fix this. =) Heh. OK, OK, thank you Konstantin ;) I'll try to recall tomorrow, but iirc I only have some ideas of how we can happily blame the FAULT_FLAG_USER logic. d, in this particular case, perhaps glibc/set_child_tid too because (again, iirc) it would nice to simply kill it, it is only used for some sanity checks... Oleg.