From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 1 Mar 2016 19:59:58 +0000 From: Al Viro To: Linus Torvalds Cc: Dmitry Vyukov , "linux-fsdevel@vger.kernel.org" , LKML , Andrea Arcangeli , Pavel Emelyanov , Andrew Morton , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin Subject: Re: fs: uninterruptible hang in handle_userfault Message-ID: <20160301195957.GD17997@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, Mar 01, 2016 at 11:56:22AM -0800, Linus Torvalds wrote: > (a) special-case the PF_EXITING case for usefaultfd, something like > > diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c > index 50311703135b..66cdb44616d5 100644 > --- a/fs/userfaultfd.c > +++ b/fs/userfaultfd.c > @@ -287,6 +287,12 @@ int handle_userfault(struct vm_area_struct > *vma, unsigned long address, > goto out; > > /* > + * We don't do userfault handling for the final child pid update. > + */ > + if (current->flags & PF_EXITING) > + goto out; Umm... Probably a dumb question, but would that suffice when e.g. another thread is just starting to dump core?