summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2005-07-27 15:06:26 +0000
committerps <ps@FreeBSD.org>2005-07-27 15:06:26 +0000
commit142d92ef250e5e3633b6b0e247c356d9d67c16b4 (patch)
treeb3a37a024a0cb62ff63b2200a86e73fab8436e2c /sys
parentc30cfa7b9be54feada4b0a43145ba8b75482a4cb (diff)
downloadFreeBSD-src-142d92ef250e5e3633b6b0e247c356d9d67c16b4.zip
FreeBSD-src-142d92ef250e5e3633b6b0e247c356d9d67c16b4.tar.gz
FIx for a bug in the change that made nfs_timer() MPSAFE. We need to
grab Giant before calling pru_send() (if running with mpsafenet = 0). Found by: Jeremie Le Hen. Fixed by: Maxime Henrion
Diffstat (limited to 'sys')
-rw-r--r--sys/nfsclient/nfs_socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index 4fb575b..a796c4c 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -1255,12 +1255,14 @@ nfs_timer(void *arg)
*/
rep->r_flags |= R_REXMIT_INPROG;
mtx_unlock(&nfs_reqq_mtx);
+ NET_LOCK_GIANT();
if ((nmp->nm_flag & NFSMNT_NOCONN) == 0)
error = (*so->so_proto->pr_usrreqs->pru_send)
(so, 0, m, NULL, NULL, curthread);
else
error = (*so->so_proto->pr_usrreqs->pru_send)
(so, 0, m, nmp->nm_nam, NULL, curthread);
+ NET_UNLOCK_GIANT();
mtx_lock(&nfs_reqq_mtx);
rep->r_flags &= ~R_REXMIT_INPROG;
wakeup((caddr_t)&rep->r_flags);
OpenPOWER on IntegriCloud