From: "J. Bruce Fields" <bfields@fieldses.org>
To: Shahar Klein <shaharklein@yahoo.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: kernel BUG at fs/nfs/namespace.c:108!
Date: Mon, 4 Aug 2008 13:48:47 -0400 [thread overview]
Message-ID: <20080804174847.GB25940@fieldses.org> (raw)
In-Reply-To: <72924.9082.qm-OZWcxxNrvPKvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
On Sun, Aug 03, 2008 at 03:07:53AM -0700, Shahar Klein wrote:
> Hi All
>
> I came across this panic due to bad server and I am wondering
> why should an nfs client panic when stumbling upon an IS_ROOT dentry
> in the point where it tries to cross mount. I mean: should an 'Innocent' client
> 'pay' for bad server behavior?
Certainly I agree with the principle that a misbehaving server shouldn't
cause the client to panic, but how exactly does that happen here? (How
will nfs_follow_mountpoint get called on a root dentry?)
--b.
>
> Is it unsafe to just clear the path and return error?
>
>
> --- a/namespace.c 2008-08-03 12:29:21.000000000 +0300
> +++ b/namespace.c 2008-08-03 12:30:54.000000000 +0300
> @@ -100,7 +100,11 @@
>
> dprintk("--> nfs_follow_mountpoint()\n");
>
> - BUG_ON(IS_ROOT(dentry));
> + if (IS_ROOT(dentry)) {
> + err = -EBUSY; // or any reasonable error
> + goto out_err;
> +
> + }
> dprintk("%s: enter\n", __FUNCTION__);
> dput(nd->dentry);
> nd->dentry = dget(dentry);
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-08-04 17:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-03 10:07 kernel BUG at fs/nfs/namespace.c:108! Shahar Klein
[not found] ` <72924.9082.qm-OZWcxxNrvPKvuULXzWHTWIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2008-08-04 17:48 ` J. Bruce Fields [this message]
2008-08-04 18:27 ` Frank Filz
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=20080804174847.GB25940@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=shaharklein@yahoo.com \
/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