summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_ktrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_ktrace.c')
-rw-r--r--sys/kern/kern_ktrace.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index fbb0b0d..7f42f67 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/mac.h>
#include <sys/malloc.h>
+#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/unistd.h>
@@ -830,9 +831,11 @@ ktrops(td, p, ops, facs, vp)
mtx_unlock(&ktrace_mtx);
PROC_UNLOCK(p);
if (tracevp != NULL) {
- mtx_lock(&Giant);
+ int vfslocked;
+
+ vfslocked = VFS_LOCK_GIANT(tracevp->v_mount);
vrele(tracevp);
- mtx_unlock(&Giant);
+ VFS_UNLOCK_GIANT(vfslocked);
}
if (tracecred != NULL)
crfree(tracecred);
OpenPOWER on IntegriCloud