Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/genfs Add missing check for dead or dying vnode t...
details: https://anonhg.NetBSD.org/src/rev/f4af135bac32
branches: trunk
changeset: 825036:f4af135bac32
user: hannken <hannken%NetBSD.org@localhost>
date: Tue Jun 27 08:40:53 2017 +0000
description:
Add missing check for dead or dying vnode to the entry of genfs_getpages().
diffstat:
sys/miscfs/genfs/genfs_io.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 78459a0ca74b -r f4af135bac32 sys/miscfs/genfs/genfs_io.c
--- a/sys/miscfs/genfs/genfs_io.c Tue Jun 27 08:30:40 2017 +0000
+++ b/sys/miscfs/genfs/genfs_io.c Tue Jun 27 08:40:53 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_io.c,v 1.69 2017/06/04 08:05:42 hannken Exp $ */
+/* $NetBSD: genfs_io.c,v 1.70 2017/06/27 08:40:53 hannken Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.69 2017/06/04 08:05:42 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.70 2017/06/27 08:40:53 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -139,6 +139,13 @@
KASSERT(vp->v_type == VREG || vp->v_type == VDIR ||
vp->v_type == VLNK || vp->v_type == VBLK);
+ error = vdead_check(vp, VDEAD_NOWAIT);
+ if (error) {
+ if ((flags & PGO_LOCKED) == 0)
+ mutex_exit(uobj->vmobjlock);
+ return error;
+ }
+
startover:
error = 0;
const voff_t origvsize = vp->v_size;
Home |
Main Index |
Thread Index |
Old Index