From e7b831453537c83df98b493f174a43105dd05983 Mon Sep 17 00:00:00 2001 From: jmmv Date: Fri, 30 Dec 2005 10:35:44 +0000 Subject: [PATCH] Avoid dereferencing the lwp parameter in nfs_receive, as it is always NULL. Solves a crash when mounting NFS shares. (The proc parameter used before the conversion to lwp's was NULL too, so the addition of 'l->l_proc' in the code was extra.) --- sys/nfs/nfs_socket.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 6a8c476af702..c6e9ba2c99aa 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.119 2005/12/11 12:25:16 christos Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.120 2005/12/30 10:35:44 jmmv Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.119 2005/12/11 12:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.120 2005/12/30 10:35:44 jmmv Exp $"); #include "fs_nfs.h" #include "opt_nfs.h" @@ -558,7 +558,6 @@ nfs_receive(rep, aname, mp, l) struct mbuf **mp; struct lwp *l; { - struct proc *p; struct socket *so; struct uio auio; struct iovec aio; @@ -568,7 +567,6 @@ nfs_receive(rep, aname, mp, l) struct mbuf **getnam; int error, sotype, rcvflg; - p = l->l_proc; /* * Set up arguments for soreceive() */