From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Altaparmakov Subject: Re: fishy ->put_inode usage in ntfs Date: Thu, 10 Feb 2005 14:59:32 +0000 Message-ID: <1108047572.12000.24.camel@imp.csi.cam.ac.uk> References: <20041014112607.GA24508@lst.de> <1097757569.21275.40.camel@imp.csi.cam.ac.uk> <20041014125933.GA26021@lst.de> <1097760404.21275.52.camel@imp.csi.cam.ac.uk> <20050210104719.GA2771@lst.de> <1108046439.12000.9.camel@imp.csi.cam.ac.uk> <20050210144254.GA7222@lst.de> <1108046906.12000.16.camel@imp.csi.cam.ac.uk> <20050210145003.GA7399@lst.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: ntfs-dev , fsdevel Received: from ppsw-5.csi.cam.ac.uk ([131.111.8.135]:36258 "EHLO ppsw-5.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S262130AbVBJO7f (ORCPT ); Thu, 10 Feb 2005 09:59:35 -0500 To: Christoph Hellwig In-Reply-To: <20050210145003.GA7399@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2005-02-10 at 15:50 +0100, Christoph Hellwig wrote: > On Thu, Feb 10, 2005 at 02:48:26PM +0000, Anton Altaparmakov wrote: > > If the igrab() were not done, it would be possible for clear_inode to be > > called on the 'parent' inode whilst at the same time one or more attr > > inodes (belonging to this 'parent') are in use and Bad Things(TM) would > > happen... > > What bad thing specificly? If there's shared information we should > probably refcount them separately. Each attr inode stores a pointer to its parent inode in NTFS_I(struct inode *vi)->ext.base_ntfs_ino. This pointer would point to random memory if clear_inode is called on the parent whilst the attr inode is still in use. Best regards, Anton -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/