Re: kernel BUG at fs/nfs/namespace.c:108!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux