Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264624AbTFLATD (ORCPT ); Wed, 11 Jun 2003 20:19:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264629AbTFLATD (ORCPT ); Wed, 11 Jun 2003 20:19:03 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:37647 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id S264624AbTFLATB (ORCPT ); Wed, 11 Jun 2003 20:19:01 -0400 Date: Wed, 11 Jun 2003 17:32:16 -0700 (PDT) From: Linus Torvalds To: Trond Myklebust cc: Alexander Viro , Linux Kernel Subject: Re: [PATCH] First casuality of hlist poisoning in 2.5.70 In-Reply-To: <16103.50069.802804.254270@charged.uio.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 987 Lines: 29 On Wed, 11 Jun 2003, Trond Myklebust wrote: > > AFAICS one should not rehash the dentry until after the d_move(). Does > that make sense? Yeah, it does seem that rehashing before actually calling d_move() means that there is a small window where another process might now come in, and use the dcache (without getting the semaphore) to see the old value of the target dentry, even though the low-level filesystem has already move the new dentry value over the target. Ie the window would be between i_op->rename(...) d_rehash(new_dentry) ... race here ... d_move(old_dentry, new_dentry) That might confuse a filesystem that expected that the target was deleted an no longer reachable by anybody. Al? What do you think? Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/