Re: NFS woes

From: Chad Schwartz (cwslist@main.cornernet.com)
Date: Sun Jun 04 2000 - 23:05:29 EST


Nice!

Hacked the one I needed (the exports.c patch..) into 2.4.0-test1-ac8 now,
and it works fine..

the other 2 seemed to BE applied already... (!?!?!?)

Thanks for the patch. :)

Chad

> The following patch will fix 3 nfsd bugs, amongst them, the one that
> you're describing.
>
> 1) Oops in fh_unlock() due to premature clearing of fh_dentry.
> 2) Dentry leak in exp_rootfh().
> 3) Filehandle leak in NFSv3 rename code.
>
> Cheers,
> Trond
>
> diff -u --recursive --new-file linux-2.3.99-pre10-3/fs/nfsd/nfsfh.c linux-2.3.99-pre10-3-nfsd/fs/nfsd/nfsfh.c
> --- linux-2.3.99-pre10-3/fs/nfsd/nfsfh.c Sat May 20 21:19:41 2000
> +++ linux-2.3.99-pre10-3-nfsd/fs/nfsd/nfsfh.c Thu May 25 15:53:27 2000
> @@ -812,8 +812,8 @@
> {
> struct dentry * dentry = fhp->fh_dentry;
> if (fhp->fh_dverified) {
> - fhp->fh_dentry = NULL;
> fh_unlock(fhp);
> + fhp->fh_dentry = NULL;
> fhp->fh_dverified = 0;
> dput(dentry);
> nfsd_nr_put++;
> diff -u --recursive --new-file linux-2.3.99-pre10-3-sunrpc/fs/nfsd/export.c linux-2.3.99-pre10-3-nfsd-1/fs/nfsd/export.c
> --- linux-2.3.99-pre10-3-sunrpc/fs/nfsd/export.c Mon May 8 20:17:47 2000
> +++ linux-2.3.99-pre10-3-nfsd-1/fs/nfsd/export.c Sun Jun 4 00:52:47 2000
> @@ -436,7 +436,6 @@
> err = 0;
> memcpy(f, &fh.fh_handle, sizeof(struct knfsd_fh));
> fh_put(&fh);
> - return err;
>
> out:
> path_release(&nd);
> diff -u --recursive --new-file linux-2.3.99-pre10-3-sunrpc/fs/nfsd/nfs3proc.c linux-2.3.99-pre10-3-nfsd-1/fs/nfsd/nfs3proc.c
> --- linux-2.3.99-pre10-3-sunrpc/fs/nfsd/nfs3proc.c Fri Mar 10 08:31:43 2000
> +++ linux-2.3.99-pre10-3-nfsd-1/fs/nfsd/nfs3proc.c Sat Jun 3 23:46:31 2000
> @@ -658,7 +658,7 @@
> PROC(mknod, mknod, create, fhandle2, RC_REPLBUFF),
> PROC(remove, dirop, wccstat, fhandle, RC_REPLBUFF),
> PROC(rmdir, dirop, wccstat, fhandle, RC_REPLBUFF),
> - PROC(rename, rename, rename, fhandle, RC_REPLBUFF),
> + PROC(rename, rename, rename, fhandle2, RC_REPLBUFF),
> PROC(link, link, link, fhandle2, RC_REPLBUFF),
> PROC(readdir, readdir, readdir, fhandle, RC_NOCACHE),
> PROC(readdirplus,readdirplus, readdir, fhandle, RC_NOCACHE),
>

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



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:20 EST