Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern softint_execute: release/re-acquire kernel-lock dep...
details: https://anonhg.NetBSD.org/src/rev/b10e23f2fa86
branches: trunk
changeset: 750614:b10e23f2fa86
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Jan 08 12:10:46 2010 +0000
description:
softint_execute: release/re-acquire kernel-lock depending on SOFTINT_MPSAFE
flag. Keeping it held for MP-safe cases break the lock order assumptions.
Per discussion with <martin>.
diffstat:
sys/kern/kern_softint.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 257c6f5d93fb -r b10e23f2fa86 sys/kern/kern_softint.c
--- a/sys/kern/kern_softint.c Fri Jan 08 12:07:08 2010 +0000
+++ b/sys/kern/kern_softint.c Fri Jan 08 12:10:46 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_softint.c,v 1.29 2009/07/19 10:11:55 yamt Exp $ */
+/* $NetBSD: kern_softint.c,v 1.30 2010/01/08 12:10:46 rmind Exp $ */
/*-
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -176,7 +176,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.29 2009/07/19 10:11:55 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.30 2010/01/08 12:10:46 rmind Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -527,7 +527,12 @@
splx(s);
/* Run the handler. */
- if ((sh->sh_flags & SOFTINT_MPSAFE) == 0 && !havelock) {
+ if (sh->sh_flags & SOFTINT_MPSAFE) {
+ if (havelock) {
+ KERNEL_UNLOCK_ONE(l);
+ havelock = false;
+ }
+ } else if (!havelock) {
KERNEL_LOCK(1, l);
havelock = true;
}
Home |
Main Index |
Thread Index |
Old Index