Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/fs/puffs Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/14d65d3beae9
branches: netbsd-8
changeset: 445625:14d65d3beae9
user: martin <martin%NetBSD.org@localhost>
date: Tue Nov 06 14:47:38 2018 +0000
description:
Pull up following revision(s) (requested by manu in ticket #1082):
sys/fs/puffs/puffs_vnops.c: revision 1.213
Fix use after RECLAIM in PUFFS filesystems
>From hannken@
When puffs_cookie2vnode() misses an entry and vrele() it operations
puffs_vnop_reclaim() and puffs_vnop_fsync() get called with a VNON
vnode.
Do not notify the server in this case as the cookie is stale.
diffstat:
sys/fs/puffs/puffs_vnops.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (41 lines):
diff -r 3ba1db418f05 -r 14d65d3beae9 sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c Tue Nov 06 14:44:22 2018 +0000
+++ b/sys/fs/puffs/puffs_vnops.c Tue Nov 06 14:47:38 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vnops.c,v 1.211 2017/05/26 14:21:01 riastradh Exp $ */
+/* $NetBSD: puffs_vnops.c,v 1.211.2.1 2018/11/06 14:47:38 martin Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.211 2017/05/26 14:21:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.211.2.1 2018/11/06 14:47:38 martin Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -1467,6 +1467,10 @@
notifyserver = false;
}
+ /* See the comment on top of puffs_vnop_inactive(). */
+ if (vp->v_type == VNON)
+ notifyserver = false;
+
/*
* purge info from kernel before issueing FAF, since we
* don't really know when we'll get around to it after
@@ -1720,6 +1724,11 @@
pn = VPTOPP(vp);
KASSERT(pn != NULL);
pmp = MPTOPUFFSMP(vp->v_mount);
+
+ /* See the comment on top of puffs_vnop_inactive(). */
+ if (vp->v_type == VNON)
+ return 0;
+
if (ap->a_flags & FSYNC_WAIT) {
mutex_enter(&pn->pn_sizemtx);
} else {
Home |
Main Index |
Thread Index |
Old Index