From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756228AbcB2QUA (ORCPT ); Mon, 29 Feb 2016 11:20:00 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:53319 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751979AbcB2QT6 (ORCPT ); Mon, 29 Feb 2016 11:19:58 -0500 Date: Mon, 29 Feb 2016 16:19:54 +0000 From: Al Viro To: Dmitry Vyukov Cc: Ian Kent , =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , "linux-fsdevel@vger.kernel.org" , LKML , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin , Linus Torvalds , David Howells Subject: Re: fs: NULL deref in atime_needs_update Message-ID: <20160229161954.GX17997@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 04:54:54PM +0100, Dmitry Vyukov wrote: > Regardless of whether reordering is wrong or not, do we see how it can > fix the WARNINGs/oopses? Because it does seem to. I've tried to revert > just this part: > > - *inode = d_backing_inode(dentry); > negative = d_is_negative(dentry); > + *inode = d_backing_inode(dentry); > > And got: > > [ 976.609688] WARNING: CPU: 0 PID: 12126 at fs/namei.c:1587 > lookup_fast+0x3fa/0x450() > [ 976.626768] WARNING: CPU: 0 PID: 12126 at fs/namei.c:3123 > path_openat+0x12bc/0x1520() > > in 15 minutes. dentry going from negative to positive lookup_fast() fetch NULL ->d_inode store non-NULL ->d_inode store new ->d_flags fetch new ->d_flags check ->d_seq bump ->d_seq by 2 Change the order of fetches and you'll get rid of that scenario. > In particular, applying this on top the previous patch will be > inconclusive, because I already don't see the warnings. Apply it with that reordering reversed, please.