Re: Possible dcache BUG

From: Linus Torvalds
Date: Thu Aug 05 2004 - 22:25:43 EST




On Fri, 6 Aug 2004 viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
>
> It doesn't even take a dput(). Look: we do list_del(), then notice that
> sucker still has positive refcount and leave it alone. Now think what
> happens on the next pass. That's right, we hit that dentry *again*. And
> see that list_empty() is false. And do list_del() one more time.

Well, the sad part is that doing another list_del() won't even necessarily
go *boom*. Most of the time it might even leave the list as-is, but often
enough it should give list corruption.

> However, what used to be e.g. next dentry might very well be freed by
> now. *BOOM*.

Absolutely. It does look like a rather nasty bug.

It doesn't explain what Gene sees, though, unless you can explain how we'd
get an anon dentry without knfsd/xfs. Oh well.

I'll commit the obvious one-liner fix, since it might explain _some_
problems people have seen.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/