CVS commit: [netbsd-7] src/sys/nfs
Module Name:src Committed By: riz Date: Sun Nov 8 01:14:20 UTC 2015 Modified Files: src/sys/nfs [netbsd-7]: nfs_vfsops.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1021): sys/nfs/nfs_vfsops.c: revision 1.231 Don't forget to call nfs_fini() when we're finished. Without this, we leave a dangling pool nfsrvdescpl around. To generate a diff of this commit: cvs rdiff -u -r1.229.2.1 -r1.229.2.2 src/sys/nfs/nfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_vfsops.c diff -u src/sys/nfs/nfs_vfsops.c:1.229.2.1 src/sys/nfs/nfs_vfsops.c:1.229.2.2 --- src/sys/nfs/nfs_vfsops.c:1.229.2.1 Wed Nov 4 17:32:00 2015 +++ src/sys/nfs/nfs_vfsops.c Sun Nov 8 01:14:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_vfsops.c,v 1.229.2.1 2015/11/04 17:32:00 riz Exp $ */ +/* $NetBSD: nfs_vfsops.c,v 1.229.2.2 2015/11/08 01:14:20 riz Exp $ */ /* * Copyright (c) 1989, 1993, 1995 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.229.2.1 2015/11/04 17:32:00 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.229.2.2 2015/11/08 01:14:20 riz Exp $"); #if defined(_KERNEL_OPT) #include "opt_nfs.h" @@ -1169,4 +1169,5 @@ nfs_vfs_done(void) nfs_node_done(); nfs_kqfini(); nfs_iodfini(); + nfs_fini(); }
CVS commit: [netbsd-7] src/sys/nfs
Module Name:src Committed By: martin Date: Sun Jul 10 09:42:34 UTC 2016 Modified Files: src/sys/nfs [netbsd-7]: nfs_clntsocket.c nfs_socket.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.1.40.1 -r1.1.40.2 src/sys/nfs/nfs_clntsocket.c cvs rdiff -u -r1.192.2.1 -r1.192.2.2 src/sys/nfs/nfs_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_clntsocket.c diff -u src/sys/nfs/nfs_clntsocket.c:1.1.40.1 src/sys/nfs/nfs_clntsocket.c:1.1.40.2 --- src/sys/nfs/nfs_clntsocket.c:1.1.40.1 Wed Nov 4 17:32:00 2015 +++ src/sys/nfs/nfs_clntsocket.c Sun Jul 10 09:42:34 2016 @@ -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 -__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 @@ nfs_reply(struct nfsreq *myrep, struct l 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 @@ nfsmout: * 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 @@ nfsmout: break; } } + splx(s); nfs_rcvunlock(nmp); /* * If not matched to a request, drop it. Index: src/sys/nfs/nfs_socket.c diff -u src/sys/nfs/nfs_socket.c:1.192.2.1 src/sys/nfs/nfs_socket.c:1.192.2.2 --- src/sys/nfs/nfs_socket.c:1.192.2.1 Wed Nov 4 17:32:00 2015 +++ src/sys/nfs/nfs_socket.c Sun Jul 10 09:42:34 2016 @@ -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 -__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 @@ nfs_reconnect(struct nfsreq *rep) { 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 @@ nfs_reconnect(struct nfsreq *rep) * 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 @@ nfs_reconnect(struct nfsreq *rep) rp->r_rexmit = 0; } } + splx(s); return (0); }
CVS commit: [netbsd-7] src/sys/nfs
Module Name:src Committed By: snj Date: Sat Feb 6 20:52:36 UTC 2016 Modified Files: src/sys/nfs [netbsd-7]: nfs_vnops.c Log Message: Pull up following revision(s) (requested by hannken in ticket #1094): sys/nfs/nfs_vnops.c: revision 1.309 Return an error if NFSPROC_LOOKUP returns the file handle of the current directory. Treating it as DOT lookup would put garbage into the name cache and could panic on future lookups. Seen with ZFS file system exported from OmniOS, an OpenSolaris derivative. Fixes PR kern/50664 "cd .." over NFS/ZFS can panic kernel To generate a diff of this commit: cvs rdiff -u -r1.306.2.1 -r1.306.2.2 src/sys/nfs/nfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_vnops.c diff -u src/sys/nfs/nfs_vnops.c:1.306.2.1 src/sys/nfs/nfs_vnops.c:1.306.2.2 --- src/sys/nfs/nfs_vnops.c:1.306.2.1 Tue May 19 04:56:45 2015 +++ src/sys/nfs/nfs_vnops.c Sat Feb 6 20:52:36 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_vnops.c,v 1.306.2.1 2015/05/19 04:56:45 snj Exp $ */ +/* $NetBSD: nfs_vnops.c,v 1.306.2.2 2016/02/06 20:52:36 snj Exp $ */ /* * Copyright (c) 1989, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.306.2.1 2015/05/19 04:56:45 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.306.2.2 2016/02/06 20:52:36 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -954,18 +954,11 @@ dorpc: if (NFS_CMPFH(np, fhp, fhsize)) { /* - * as we handle "." lookup locally, this should be + * As we handle "." lookup locally, this is * a broken server. */ - vref(dvp); - newvp = dvp; -#ifndef NFS_V2_ONLY - if (v3) { - nfsm_postop_attr(newvp, attrflag, 0); - nfsm_postop_attr(dvp, attrflag, 0); - } else -#endif - nfsm_loadattr(newvp, (struct vattr *)0, 0); + m_freem(mrep); + return EBADRPC; } else if (flags & ISDOTDOT) { /* * ".." lookup
CVS commit: [netbsd-7] src/sys/nfs
Module Name:src Committed By: snj Date: Tue May 19 04:56:46 UTC 2015 Modified Files: src/sys/nfs [netbsd-7]: nfs_vnops.c Log Message: Pull up following revision(s) (requested by chs in ticket #769): sys/nfs/nfs_vnops.c: revision 1.308 in nfs_writerpc(), avoid a signed/unsigned problem in computing the number of bytes to back up in the uio when we need to resend a write RPC (eg. after a server crash) on a 64-bit platform. should fix PR 35448. To generate a diff of this commit: cvs rdiff -u -r1.306 -r1.306.2.1 src/sys/nfs/nfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_vnops.c diff -u src/sys/nfs/nfs_vnops.c:1.306 src/sys/nfs/nfs_vnops.c:1.306.2.1 --- src/sys/nfs/nfs_vnops.c:1.306 Fri Jul 25 08:20:53 2014 +++ src/sys/nfs/nfs_vnops.c Tue May 19 04:56:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_vnops.c,v 1.306 2014/07/25 08:20:53 dholland Exp $ */ +/* $NetBSD: nfs_vnops.c,v 1.306.2.1 2015/05/19 04:56:45 snj Exp $ */ /* * Copyright (c) 1989, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.306 2014/07/25 08:20:53 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.306.2.1 2015/05/19 04:56:45 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -1311,7 +1311,7 @@ retry: byte_count = 0; /* count of bytes actually written */ while (tsiz > 0) { uint32_t datalen; /* data bytes need to be allocated in mbuf */ - uint32_t backup; + size_t backup; bool stalewriteverf = false; nfsstats.rpccnt[NFSPROC_WRITE]++;