Linux-kernel mailing list archive 1999-37,: Re: nfsd Security: /// bad export. error

# Re: nfsd Security: /// bad export. error

G. Allen Morris III (gam3@ixlabs.com)
Sun, 12 Sep 1999 23:18:46 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: CaT: "Re: 2.3.18 kernel not able to mount root file system"
- Previous message: Zack Weinberg: "Re: fyi, 2.0.36 read() EBADF bug (it was O_WRONLY)"
- Maybe in reply to: T.A. dos Santos: "nfsd Security: /// bad export. error"
- Next in thread: Philippe Troin: "Re: nfsd Security: /// bad export. error"
- Reply: Philippe Troin: "Re: nfsd Security: /// bad export. error"

My guess of what is happing here is that there the original
dentry is flushed out of memory. Then when the file is next
accessed the path has to be rebuilt. This generate all new
dentries, so the search to find the export point fails.

The solution might be:

--- nfsfh.c.orig Sun Sep 12 23:15:35 1999
+++ nfsfh.c Sun Sep 12 23:16:26 1999
@@ -1124,7 +1124,7 @@
do {
tdentry = tdentry->d_parent;
- if (exp->ex_dentry == tdentry)
+ if (exp->ex_dentry->d_inode->i_ino == tdentry->d_inode->i_ino)
break;
/* executable only by root and we can't be root */
if (current->fsuid &&

Or something a long those lines. (I am guessing.)

Allen

>>>Philippe Troin said:
> "T.A. dos Santos" <teste@naomi.fe.up.pt> writes:
> I've also seen this problem, but it happens every few days on a NFS
> server with linux 2.2.12 UP + HJL's knfs patches.
>
> I came with this patch to trace the problem:
>
> --- /usr/local/src/linux-2.2.12/fs/nfsd/nfsfh.c.linus Mon Aug 30 18:3
9:52 1999
> +++ /usr/local/src/linux-2.2.12/fs/nfsd/nfsfh.c Fri Sep 10 00:59:34 199
9
> @@ -1240,11 +1240,22 @@
> }
> } while ((tdentry != tdentry->d_parent));
> if (exp->ex_dentry != tdentry) {
> + struct dentry *pdentry = dentry;
> error = nfserr_stale;
> nfsdstats.fh_stale++;
> printk("nfsd Security: %s/%s bad export.\n",
> dentry->d_parent->d_name.name,
> dentry->d_name.name);

[snip]

---------------------------------
G. Allen Morris III

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

- Next message: CaT: "Re: 2.3.18 kernel not able to mount root file system"
- Previous message: Zack Weinberg: "Re: fyi, 2.0.36 read() EBADF bug (it was O_WRONLY)"
- Maybe in reply to: T.A. dos Santos: "nfsd Security: /// bad export. error"
- Next in thread: Philippe Troin: "Re: nfsd Security: /// bad export. error"
- Reply: Philippe Troin: "Re: nfsd Security: /// bad export. error"