Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/nfs Pull up following revision(s) (requested by chris...
details: https://anonhg.NetBSD.org/src/rev/2eddd5c92ec3
branches: netbsd-7
changeset: 799934:2eddd5c92ec3
user: martin <martin%NetBSD.org@localhost>
date: Sun Jul 10 09:42:34 2016 +0000
description:
Pull up following revision(s) (requested by christos in ticket #1184):
sys/nfs/nfs_socket.c: revision 1.198
sys/nfs/nfs_clntsocket.c: revision 1.5
Serialize all access to the NFS request queue via splsoftnet(). Fixes random
crashes.
XXX: Pullup-7
diffstat:
sys/nfs/nfs_clntsocket.c | 8 +++++---
sys/nfs/nfs_socket.c | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (86 lines):
diff -r f85dd07112fe -r 2eddd5c92ec3 sys/nfs/nfs_clntsocket.c
--- a/sys/nfs/nfs_clntsocket.c Sun Jul 10 09:38:38 2016 +0000
+++ b/sys/nfs/nfs_clntsocket.c Sun Jul 10 09:42:34 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_clntsocket.c,v 1.1.40.1 2015/11/04 17:32:00 riz Exp $ */
+/* $NetBSD: nfs_clntsocket.c,v 1.1.40.2 2016/07/10 09:42:34 martin Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_clntsocket.c,v 1.1.40.1 2015/11/04 17:32:00 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_clntsocket.c,v 1.1.40.2 2016/07/10 09:42:34 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_nfs.h"
@@ -324,7 +324,7 @@
struct mbuf *mrep, *nam, *md;
u_int32_t rxid, *tl;
char *dpos, *cp2;
- int error;
+ int error, s;
/*
* Loop around until we get our own reply
@@ -402,6 +402,7 @@
* Loop through the request list to match up the reply
* Iff no match, just drop the datagram
*/
+ s = splsoftnet();
TAILQ_FOREACH(rep, &nfs_reqq, r_chain) {
if (rep->r_mrep == NULL && rxid == rep->r_xid) {
/* Found it.. */
@@ -465,6 +466,7 @@
break;
}
}
+ splx(s);
nfs_rcvunlock(nmp);
/*
* If not matched to a request, drop it.
diff -r f85dd07112fe -r 2eddd5c92ec3 sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Sun Jul 10 09:38:38 2016 +0000
+++ b/sys/nfs/nfs_socket.c Sun Jul 10 09:42:34 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_socket.c,v 1.192.2.1 2015/11/04 17:32:00 riz Exp $ */
+/* $NetBSD: nfs_socket.c,v 1.192.2.2 2016/07/10 09:42:34 martin Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.192.2.1 2015/11/04 17:32:00 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.192.2.2 2016/07/10 09:42:34 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_nfs.h"
@@ -358,7 +358,7 @@
{
struct nfsreq *rp;
struct nfsmount *nmp = rep->r_nmp;
- int error;
+ int error, s;
time_t before_ts;
nfs_disconnect(nmp);
@@ -393,6 +393,7 @@
* Loop through outstanding request list and fix up all requests
* on old socket.
*/
+ s = splsoftnet();
TAILQ_FOREACH(rp, &nfs_reqq, r_chain) {
if (rp->r_nmp == nmp) {
if ((rp->r_flags & R_MUSTRESEND) == 0)
@@ -400,6 +401,7 @@
rp->r_rexmit = 0;
}
}
+ splx(s);
return (0);
}
Home |
Main Index |
Thread Index |
Old Index