Re: BUG_ON(nd->inode->i_op->follow_link);

From: Dave Jones
Date: Thu Mar 07 2013 - 18:03:27 EST


On Thu, Mar 07, 2013 at 02:50:55PM -0800, Linus Torvalds wrote:

> Yes, I can reproduce this, and I know what's going on. I don't have a
> patch, though, and I think it's in Al's court on what we should do.
> Al?
>
> Anyway, so the "old=fd" thing implies that it's one of the symlinks in
> /proc/xyz/fd/, so that's something. It could have been the
> cwd/exe/mmap ones. But that was kind of the expectation to begin with.
>
> The "new=1:9" is the path that the file descriptor contained, and
> since you're playing games with /proc, /sys and /dev, *and* since you
> hit the "it shouldn't be a symlink" test, I'm *guessing* that it might
> be something like
>
> /sys/dev/char/1:9

Strange, I told it to *only* use /proc on that run, so it shouldn't have sucked
in anything from /dev unless something in /proc symlinks there and nftw()
ended up chasing it.

> which is a symlink to ../../devices/virtual/mem/urandom/.
>
> And here is how you reproduce this:

But this at least is one step towards restoring my belief that I'm not
going crazy here.

> Al, I think the BUG_ON() is simply bogus. Should we just remove it? Or
> is there some conceptual reason why we can't handle a symlink there?

For the time being, I'll remove that just so I can stop seeing it,
as it seems there's plenty of others to be chasing and you've got
a handle on this one.

Dave

--
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/