Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/sommerfeld_i386mp_1]: src/sys/arch/i386/i386 ktrace: Relock kernel when ...



details:   https://anonhg.NetBSD.org/src/rev/6f711720b6b7
branches:  sommerfeld_i386mp_1
changeset: 482281:6f711720b6b7
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Thu Aug 24 11:26:12 2000 +0000

description:
ktrace: Relock kernel when emitting syscall return ktrace record.

diffstat:

 sys/arch/i386/i386/trap.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r c31e3d221c81 -r 6f711720b6b7 sys/arch/i386/i386/trap.c
--- a/sys/arch/i386/i386/trap.c Thu Aug 24 02:33:11 2000 +0000
+++ b/sys/arch/i386/i386/trap.c Thu Aug 24 11:26:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.134.2.5 2000/08/23 18:27:59 sommerfeld Exp $        */
+/*     $NetBSD: trap.c,v 1.134.2.6 2000/08/24 11:26:12 sommerfeld Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -846,8 +846,11 @@
        KERNEL_PROC_UNLOCK(p);
        userret(p, frame.tf_eip, sticks);
 #ifdef KTRACE
-       if (KTRPOINT(p, KTR_SYSRET))
+       if (KTRPOINT(p, KTR_SYSRET)) {
+               KERNEL_PROC_LOCK(p);
                ktrsysret(p, code, error, rval[0]);
+               KERNEL_PROC_UNLOCK(p);
+       }
 #endif /* KTRACE */
 }
 



Home | Main Index | Thread Index | Old Index