summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-11-18 21:16:45 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-11-18 21:16:45 +0000
commitf1ce453e03f3e443c0be15acf3897c357ebf9ddc (patch)
tree84386fd57a3f91a7061f650bdf1d98222cfaa485 /sys/arch/sparc64
parentba4762d704163a6d0ff4100f6e529486b0972f10 (diff)
Add missing locking around ktrsyscall() call.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/trap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 20378b731f1..58fb0ec341d 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.57 2007/10/31 22:46:52 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.58 2007/11/18 21:16:44 kettenis Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -1358,9 +1358,11 @@ syscall(tf, code, pc)
*argp++ = *ap++;
#ifdef KTRACE
- if (KTRPOINT(p, KTR_SYSCALL))
- ktrsyscall(p, code,
- callp->sy_argsize, args);
+ if (KTRPOINT(p, KTR_SYSCALL)) {
+ KERNEL_PROC_LOCK(p);
+ ktrsyscall(p, code, callp->sy_argsize, args);
+ KERNEL_PROC_UNLOCK(p);
+ }
#endif
if (error)
goto bad;