summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-17 12:00:05 +0000
committerjeff <jeff@FreeBSD.org>2005-03-17 12:00:05 +0000
commit91796cd6d745c48b440f94ccb9e27bb868c18b33 (patch)
tree23df99005fb8d74da8676a3f8559baaebdf02623
parent479ac055a18b3122ef3d329f1d761e84da4df9b7 (diff)
downloadFreeBSD-src-91796cd6d745c48b440f94ccb9e27bb868c18b33.zip
FreeBSD-src-91796cd6d745c48b440f94ccb9e27bb868c18b33.tar.gz
- Lock the clearing of v_data so it is safe to inspect it with the
interlock. Sponsored by: Isilon Systems, Inc.
-rw-r--r--sys/fs/nullfs/null_vnops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 3ab3a6f..fe4b740 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -627,12 +627,18 @@ null_reclaim(struct vop_reclaim_args *ap)
struct vnode *lowervp = xp->null_lowervp;
struct lock *vnlock;
+ /*
+ * Use the interlock to protect the clearing of v_data to
+ * prevent faults in null_lock().
+ */
+ VI_LOCK(vp);
+ vp->v_data = NULL;
+ VI_UNLOCK(vp);
if (lowervp) {
null_hashrem(xp);
vrele(lowervp);
}
- vp->v_data = NULL;
vp->v_object = NULL;
vnlock = vp->v_vnlock;
vp->v_vnlock = &vp->v_lock;
OpenPOWER on IntegriCloud