Hi


  Version: Linus kernel 2.2.12+Alan prepatch 2.2.13pre12+some knfsd 1.5.1 diffs

  In this config we had OOPSes from kernel during break of large operation
by CTRL-C from Sun-mounted filesystem. Currently it only prints some IMHO
   ----------------------------------
harmless error messages from the client which will disappear when the file is
unlinked.

  Although I expect that a similiar check may be potentially needed in other
function around (like nfssvc_encode_diropres, nfssvc_encode_readlinkres etc.).
And please note that I have no knowledge of the nfsd code in the kernel so
the fix may be in some a bit inappropriate place.

  BEWARE: I was returning value 1 before and consequently ext2 bitmap errors
occured at our server which were never seen before - it had yet to be
investigated whether it has been caused by this patch but you have been warned
(about returning 1). Returning 1 had visible impact only on reducing the count
of "parachuting" messages but evidently the returned result was much more
pervasive than expected.


                                                Karel Zatloukal



--- linux/fs/nfsd/nfsxdr.c-orig Sun Sep 26 23:31:53 1999
+++ linux/fs/nfsd/nfsxdr.c      Sun Sep 26 19:07:09 1999
@@ -364,6 +364,10 @@
 nfssvc_encode_attrstat(struct svc_rqst *rqstp, u32 *p,
                                        struct nfsd_attrstat *resp)
 {
+       if (!resp->fh.fh_dentry) {
+               printk(KERN_WARNING "nfsd: nfssvc_encode_attrstat() parachuting!\n");
+               return 0;
+       }
        if (!(p = encode_fattr(rqstp, p, resp->fh.fh_dentry->d_inode)))
                return 0;
        return xdr_ressize_check(rqstp, p);

Reply via email to