From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <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> <20160229165031.GY17997@ZenIV.linux.org.uk> Date: Mon, 29 Feb 2016 09:24:04 -0800 Message-ID: Subject: Re: fs: NULL deref in atime_needs_update From: Linus Torvalds To: Al Viro Cc: Dmitry Vyukov , Ian Kent , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , "linux-fsdevel@vger.kernel.org" , LKML , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin , David Howells Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: On Mon, Feb 29, 2016 at 8:50 AM, Al Viro wrote: > > In __d_entry_type(), you mean? Should be, along with READ_ONCE() there. > AFAICS, ordering shouldn't be an issue anymore... That's the one. It results in those barriers in very subtle places, and it was always unclear whether any of the users of those "d_is_*()" helper functions really understood the subtle memory ordering involved. The smp_rmb() is also potentially quite expensive on some architectures. So getting rid of those hidden memory orderings would be a goodness quite apart from fixing the bug Dmitry found. Linus