From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751501AbcB2Qui (ORCPT ); Mon, 29 Feb 2016 11:50:38 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:53924 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbcB2Quf (ORCPT ); Mon, 29 Feb 2016 11:50:35 -0500 Date: Mon, 29 Feb 2016 16:50:31 +0000 From: Al Viro To: Linus Torvalds Cc: Dmitry Vyukov , Ian Kent , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , "linux-fsdevel@vger.kernel.org" , LKML , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin , David Howells Subject: Re: fs: NULL deref in atime_needs_update Message-ID: <20160229165031.GY17997@ZenIV.linux.org.uk> References: <20160226212137.GF17997@ZenIV.linux.org.uk> <20160226220759.GH17997@ZenIV.linux.org.uk> <20160227222748.GI17997@ZenIV.linux.org.uk> <20160228170133.GM17997@ZenIV.linux.org.uk> <20160228200100.GP17997@ZenIV.linux.org.uk> <20160229130924.GV17997@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 Mon, Feb 29, 2016 at 08:45:37AM -0800, Linus Torvalds wrote: > > David, Linus, do you see any problems with that? To me it looks saner > > that way and as cheap as the current code, but I might be missing something > > here... > > I'd absolutely love to see this. The memory ordering for the flags > updates and reading was always really confusing, and I hated how it > was hidden inside the random access functions. And apparently it > wasn't just confusing, it was buggy too. > > But I'd love it _more_ if this also means that we can get rid of the > rmb's, which your patch didn't. Can we? Or does the ordering still > remain for some other issue? In __d_entry_type(), you mean? Should be, along with READ_ONCE() there. AFAICS, ordering shouldn't be an issue anymore...