Source-Changes-HG archive

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

[src/trunk]: src/sys/kern missing systrace_lock() around lock operation. syn...



details:   https://anonhg.NetBSD.org/src/rev/b0bb1f08e52b
branches:  trunk
changeset: 534302:b0bb1f08e52b
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 21 00:25:01 2002 +0000

description:
missing systrace_lock() around lock operation.  sync w/openbsd, provos ok

diffstat:

 sys/kern/kern_systrace.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r 7c145a3431b8 -r b0bb1f08e52b sys/kern/kern_systrace.c
--- a/sys/kern/kern_systrace.c  Sun Jul 21 00:12:28 2002 +0000
+++ b/sys/kern/kern_systrace.c  Sun Jul 21 00:25:01 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_systrace.c,v 1.9 2002/07/20 00:03:08 itojun Exp $ */
+/*     $NetBSD: kern_systrace.c,v 1.10 2002/07/21 00:25:01 itojun Exp $        */
 
 /*
  * Copyright 2002 Niels Provos <provos%citi.umich.edu@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.9 2002/07/20 00:03:08 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.10 2002/07/21 00:25:01 itojun Exp $");
 
 #include "opt_systrace.h"
 
@@ -333,7 +333,9 @@
        if (ret)
                return (ret);
        
+       systrace_lock();
        SYSTRACE_LOCK(fst, curproc);
+       systrace_unlock();
        if (pid) {
                strp = systrace_findpid(fst, pid);
                if (strp == NULL) {
@@ -416,7 +418,9 @@
        if (which != FREAD)
                return (0);
 
+       systrace_lock();
        SYSTRACE_LOCK(fst, p);
+       systrace_unlock();
        ready = TAILQ_FIRST(&fst->messages) != NULL;
        if (!ready)
                selrecord(p, &fst->si);
@@ -451,7 +455,9 @@
        struct str_process *strp;
        struct str_policy *strpol;
 
+       systrace_lock();
        SYSTRACE_LOCK(fst, curproc);
+       systrace_unlock();
 
        /* Untrace all processes */
        for (strp = TAILQ_FIRST(&fst->processes); strp;



Home | Main Index | Thread Index | Old Index