From 4b8c17c6691938a12b212c1671c61d9744309e54 Mon Sep 17 00:00:00 2001 From: "Thordur I. Bjornsson" Date: Fri, 28 Dec 2007 17:25:19 +0000 Subject: 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@ --- sys/nfs/nfs_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/nfs') 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", -- cgit v1.2.3