Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/sys/kern secpolicy_vnode_access must be ...
details: https://anonhg.NetBSD.org/src/rev/2f9455180ea6
branches: trunk
changeset: 782100:2f9455180ea6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Oct 15 22:50:25 2012 +0000
description:
secpolicy_vnode_access must be called with the vnode lock held.
Don't unlock the vnode and then tell the caller about what the world
was like while the vnode was locked. The world changes fast.
diffstat:
external/cddl/osnet/sys/kern/policy.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (25 lines):
diff -r ada31be66b03 -r 2f9455180ea6 external/cddl/osnet/sys/kern/policy.c
--- a/external/cddl/osnet/sys/kern/policy.c Mon Oct 15 22:43:50 2012 +0000
+++ b/external/cddl/osnet/sys/kern/policy.c Mon Oct 15 22:50:25 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: policy.c,v 1.2 2010/06/24 13:03:05 hannken Exp $ */
+/* $NetBSD: policy.c,v 1.3 2012/10/15 22:50:25 riastradh Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -143,12 +143,10 @@
secpolicy_vnode_access(kauth_cred_t cred, struct vnode *vp, uint64_t owner,
int mode)
{
- int error;
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- error = VOP_ACCESS(vp, mode, cred);
- VOP_UNLOCK(vp);
- return error;
+ (void)owner; /* XXX ignore? */
+ KASSERT(VOP_ISLOCKED(vp));
+ return VOP_ACCESS(vp, mode, cred);
}
/*
Home |
Main Index |
Thread Index |
Old Index