From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:33824 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062AbcFCWX6 (ORCPT ); Fri, 3 Jun 2016 18:23:58 -0400 Date: Fri, 3 Jun 2016 23:23:55 +0100 From: Al Viro To: Linus Torvalds Cc: Oleg Drokin , " Mailing List" , "" Subject: Re: Dcache oops Message-ID: <20160603222355.GW14480@ZenIV.linux.org.uk> References: <20160603033750.GL14480@ZenIV.linux.org.uk> <0C971585-6BFC-4665-832B-9B262F733BFC@linuxhacker.ru> <20160603042648.GN14480@ZenIV.linux.org.uk> <74306F63-DBDF-4DED-85D2-5C3FB21B8A1E@linuxhacker.ru> <20160603182203.GR14480@ZenIV.linux.org.uk> <4285E00F-7228-485C-AD32-97552ED746F2@linuxhacker.ru> <20160603200759.GS14480@ZenIV.linux.org.uk> <20160603212652.GT14480@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 03, 2016 at 03:00:02PM -0700, Linus Torvalds wrote: > Is perhaps the "delayed_call" logic broken, and the symlink is free'd too early? > > That whole set_delayed_call/do_delayed_call thing came in 4.5. Maybe > something broke that logic, and we've executed the delayed freeing > before we should have. > > Normally it's done at terminate_walk() time. But I note that in > walk_component(), we do put_link(nd) which does a do_delayed_call(), > but does *not* do a clear_delayed_call(), so now I think a subsequent > terminate_walk() might drop it *again*. Nope - put_link() also decrements nd->depth. No double calls there... > I'm probably missing something, but I have to say that the old > explicit "put_link()" callback logic was more obvious than the new > delayed calls are. It's not that. It's explicit put_link() in do_last(), followed by ESTALEOPEN and subsequent misbegotten "retry the last step on ESTALEOPEN" looking at now-freed nd->last.name. IOW, the bug predates delayed_call stuff.