From: viro@parcelfarce.linux.theplanet.co.uk Subject: Re: [PATCH] ext3 [linux-2.6.2.]: accessing already freed inodes when under memory pressure Date: Thu, 19 Feb 2004 20:26:57 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040219202657.GF31035@parcelfarce.linux.theplanet.co.uk> References: <200402191321.39592.cotte@freenet.de> <1077212393.2070.571.camel@sisko.scot.redhat.com> <20040219104905.7d87f351.akpm@osdl.org> <200402192128.12923.cotte@freenet.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , "Stephen C. Tweedie" , torvalds@osdl.org, linux-fsdevel@vger.kernel.org, schwidefsky@de.ibm.com, cotte@de.ibm.com Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:40856 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S267555AbUBSU07 (ORCPT ); Thu, 19 Feb 2004 15:26:59 -0500 To: Carsten Otte Content-Disposition: inline In-Reply-To: <200402192128.12923.cotte@freenet.de> List-Id: linux-fsdevel.vger.kernel.org On Thu, Feb 19, 2004 at 09:28:06PM +0100, Carsten Otte wrote: > Am Donnerstag 19 Februar 2004 19:49 schrieb Andrew Morton: > > There are a lot of places where we don't actually hold inode->i_sem while > > diddling inode->i_nlink: ext3_unlink, ext3_rename, others. > > > > hmm, I wonder if that could be it? If the inode is hardlinked into a > > different directory then the parent dir's i_sem gives us no i_nlink > > protection. > > > > Carsten, are you aware of a particular workload which triggers this? > So far not, all I know is the symptom and a probable cause may be the > sys_unlink path. I will try to dig that direction with another debugging > patch tomorrow. We hold ->i_sem *on* *the* *inode*. And yes, unlink does grab it both on parent and child.