diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-12-28 17:25:19 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-12-28 17:25:19 +0000 |
commit | 4b8c17c6691938a12b212c1671c61d9744309e54 (patch) | |
tree | 3a59b05bd9b039890f066c5e607b0eaee001911b /sys/nfs | |
parent | 543fde3e85cb19f3ac50ab9242d83bcc57291cfd (diff) |
nfs_sndlock() is often called with its rep argument
as NULL, so make sure its non-NULL before attempting
to reference it.
Fixes PR5694; Confirmed by submitter.
OK art@, krw@
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 427aa8e1ca4..4133044ffa0 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.55 2007/10/28 14:12:41 thib Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.56 2007/12/28 17:25:18 thib Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -1333,7 +1333,7 @@ nfs_sndlock(flagp, rep) } else p = (struct proc *)0; while (*flagp & NFSMNT_SNDLOCK) { - if (nfs_sigintr(rep->r_nmp, rep, p)) + if (rep && nfs_sigintr(rep->r_nmp, rep, p)) return (EINTR); *flagp |= NFSMNT_WANTSND; (void) tsleep((caddr_t)flagp, slpflag | (PZERO - 1), "nfsndlck", |