Re: Oops Null pointer dereference 2.3.99-pre5 NFS Root

From: Ben Von Handorf (handorf@penguinpowered.com)
Date: Sat Apr 22 2000 - 17:22:27 EST


OK, I think I've fixed it myself. I would VERY much appreciate it if somebody
in the know about this part of the kernel would check my solution, but hey,
it seems to work (or at least gets me farther along the booting process!

Rather than zeroing the whome mnt_fhstatus structure, I just zero the nfs_fh
structure it points to.

ALSO NOTE: I haven't fixed the same issue in the next function in the file,
xdr_decode_fhstatus3. Apparently my installation doesn't call it (no,
I'm not using v3 NFS), so if my solution for this is correct, it should
be fixed in the that function, too.

Short patch follows:

--- fs/nfs/mount_clnt.c.0 Sat Apr 22 17:17:39 2000
+++ fs/nfs/mount_clnt.c Sat Apr 22 18:17:11 2000
@@ -120,7 +120,7 @@
 static int
 xdr_decode_fhstatus(struct rpc_rqst *req, u32 *p, struct mnt_fhstatus *res)
 {
- memset((u8 *)res, 0, sizeof(*res));
+ memset((u8 *)res->fh, 0, sizeof(*res->fh));
        if ((res->status = ntohl(*p++)) == 0) {
                res->fh->size = NFS2_FHSIZE;
                memcpy(res->fh->data, p, NFS2_FHSIZE);

Please let me know if I really foobared this.

Thanks,

Ben

--
Ben Von Handorf
handorf@penguinpowered.com

- 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 : Sun Apr 23 2000 - 21:00:21 EST