Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Note yet another SMP danger spot.



details:   https://anonhg.NetBSD.org/src/rev/272dea10a388
branches:  trunk
changeset: 543126:272dea10a388
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Mon Feb 17 23:32:33 2003 +0000

description:
Note yet another SMP danger spot.

diffstat:

 sys/kern/kern_sa.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r fe54fa80e7a9 -r 272dea10a388 sys/kern/kern_sa.c
--- a/sys/kern/kern_sa.c        Mon Feb 17 22:44:37 2003 +0000
+++ b/sys/kern/kern_sa.c        Mon Feb 17 23:32:33 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sa.c,v 1.10 2003/02/14 20:45:12 nathanw Exp $     */
+/*     $NetBSD: kern_sa.c,v 1.11 2003/02/17 23:32:33 nathanw Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.10 2003/02/14 20:45:12 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.11 2003/02/17 23:32:33 nathanw Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -999,6 +999,11 @@
 #endif
                }
                sa_putcachelwp(p, l2);
+               /*
+                * XXX SMP race! Need to be sure that l2's state is
+                * captured before the upcall before we make it possible
+                * for another processor to grab it.
+                */
                SCHED_UNLOCK(s);
        }
        return l2;



Home | Main Index | Thread Index | Old Index