public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo@kvack.org>
To: Willy Tarreau <willy@w.ods.org>
Cc: Grant Coady <gcoady.lk@gmail.com>,
	linux-kernel@vger.kernel.org,
	Grant Coady <grant_lkml@dodo.com.au>,
	Chris Wright <chrisw@sous-sol.org>
Subject: Re: [ANNOUNCE] Linux-2.4.32-hf32.5
Date: Fri, 26 May 2006 15:27:58 -0300	[thread overview]
Message-ID: <20060526182758.GB565@dmt> (raw)
In-Reply-To: <20060526140731.GC14725@w.ods.org>

On Fri, May 26, 2006 at 04:07:31PM +0200, Willy Tarreau wrote:
> [ I removed Jari who told me yesterday he did not need to be Cc'd ]
> 
> On Fri, May 26, 2006 at 11:28:51PM +1000, Grant Coady wrote:
> > On Fri, 26 May 2006 14:16:23 +0200, Willy Tarreau <willy@w.ods.org> wrote:
> > 
> > >Could you please pass it through ksymoops so that we get an idea about the
> > >function causing this ? What was the last version not causing it ? hf32.4 ?
> > 
> > Yes, hf32.4 okay, see: <http://bugsplatter.mine.nu/test/linux-2.4/>
> > 
> > >This looks like a structure member gets accessed while a pointer is NULL,
> > >if you always get 0x88... I would be it could come from
> > >2.4.32-ext3-link-unlink-race-1, but that would be strange.
> > 
> > Good guess!  The previous version comment stripped .configs are 
> > linked by machine name from the summary page above.
> 
> Hmmm that's bad, this one has been merged into mainline.
> It would look like dentry->d_inode is NULL here :
> 
>   double_down(&dir->i_zombie, &dentry->d_inode->i_zombie);
> 
> I don't know how this can be fixed, though ! My first guess would be to
> quickly revert the patch. 

may_delete() should be called before attempting to grab victim's
i_zombie. Grant, can you please try the following?

diff --git a/fs/namei.c b/fs/namei.c
index 48bd26c..42cce98 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1479,19 +1479,20 @@ int vfs_unlink(struct inode *dir, struct
 {
 	int error;
 
-	double_down(&dir->i_zombie, &dentry->d_inode->i_zombie);
 	error = may_delete(dir, dentry, 0);
-	if (!error) {
-		error = -EPERM;
-		if (dir->i_op && dir->i_op->unlink) {
-			DQUOT_INIT(dir);
-			if (d_mountpoint(dentry))
-				error = -EBUSY;
-			else {
-				lock_kernel();
-				error = dir->i_op->unlink(dir, dentry);
-				unlock_kernel();
-			}
+	if (error)
+		return error;
+
+	double_down(&dir->i_zombie, &dentry->d_inode->i_zombie);
+	error = -EPERM;
+	if (dir->i_op && dir->i_op->unlink) {
+		DQUOT_INIT(dir);
+		if (d_mountpoint(dentry))
+			error = -EBUSY;
+		else {
+			lock_kernel();
+			error = dir->i_op->unlink(dir, dentry);
+			unlock_kernel();
 		}
 	}
 	double_up(&dir->i_zombie, &dentry->d_inode->i_zombie);

  reply	other threads:[~2006-05-26 18:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-07 13:10 [ANNOUNCE] Linux-2.4.32-hf32.4 Willy Tarreau
2006-05-25 13:34 ` [ANNOUNCE] Linux-2.4.32-hf32.5 Willy TARREAU
2006-05-26 11:09   ` Grant Coady
2006-05-26 12:16     ` Willy Tarreau
2006-05-26 13:28       ` Grant Coady
2006-05-26 14:07         ` Willy Tarreau
2006-05-26 18:27           ` Marcelo Tosatti [this message]
2006-05-26 19:29             ` Grant Coady
2006-05-26 19:43               ` Willy Tarreau
2006-05-26 18:38           ` Grant Coady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060526182758.GB565@dmt \
    --to=marcelo@kvack.org \
    --cc=chrisw@sous-sol.org \
    --cc=gcoady.lk@gmail.com \
    --cc=grant_lkml@dodo.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@w.ods.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox