From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756389AbcCBAsw (ORCPT ); Tue, 1 Mar 2016 19:48:52 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:37336 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754991AbcCBAsu (ORCPT ); Tue, 1 Mar 2016 19:48:50 -0500 Date: Wed, 2 Mar 2016 00:48:46 +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: <20160302004845.GF17997@ZenIV.linux.org.uk> References: <20160301195957.GD17997@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 01, 2016 at 12:06:49PM -0800, Linus Torvalds wrote: > So the only access we really care about is the child tid-pointer > clearing one, and that always happens after PF_EXITING has been set > afaik. > > No other case really matters. If somebody accesses a userfault region > just as another thread is exiting, we don't care. I don't think it > would necessarily be wrong to ignore the fault, but I don't think it's > relevant either, since at that stage the normal "you can signal the > thread" still works. It's only the child tid access that comes *after* > we have stopped acceping signals, and that's marked by that > PF_EXITING. > > Or maybe I misunderstood your worry entirely or missed something, and > my answer above is entirely beside your point. Did you have something > else in mind? No, I've misread de_thread()/zap_other_threads(). No objections to the patch.