Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-0]: src/sys/kern Pull up following revision(s) (requested by kn...
details: https://anonhg.NetBSD.org/src/rev/5cc134f90d14
branches: netbsd-6-0
changeset: 775134:5cc134f90d14
user: snj <snj%NetBSD.org@localhost>
date: Thu Jul 14 06:43:35 2016 +0000
description:
Pull up following revision(s) (requested by knakahara in ticket #1356):
sys/kern/kern_softint.c: revision 1.42
fix the following softint parallel operation problem.
(0) softint handler "handler A" is established
(1) CPU#X does softint_schedule() for "handler A"
- the softhand_t is set SOFTINT_PENDING flag
- the softhand_t is NOT set SOFTINT_ACTIVE flag yet
(2) CPU#X begins other H/W interrupt processing
(3) CPU#Y does softint_disestablish() for "handler A"
- waits until softhand_t's SOFTINT_ACTIVE of all CPUs is clear
- the softhand_t is set not SOFTINT_ACTIVE but SOFTINT_PENDING,
so CPU#Y does not wait
- unset the function of "handler A"
(4) CPU#X does softint_execute()
- the function of "handler A" is already clear, so panic
diffstat:
sys/kern/kern_softint.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 3a5d42d42c7e -r 5cc134f90d14 sys/kern/kern_softint.c
--- a/sys/kern/kern_softint.c Wed May 18 10:44:41 2016 +0000
+++ b/sys/kern/kern_softint.c Thu Jul 14 06:43:35 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_softint.c,v 1.38.14.1 2013/02/08 19:31:19 riz Exp $ */
+/* $NetBSD: kern_softint.c,v 1.38.14.2 2016/07/14 06:43:35 snj 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.38.14.1 2013/02/08 19:31:19 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.38.14.2 2016/07/14 06:43:35 snj Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -424,8 +424,8 @@
KASSERT(sh->sh_func != NULL);
flags |= sh->sh_flags;
}
- /* Inactive on all CPUs? */
- if ((flags & SOFTINT_ACTIVE) == 0) {
+ /* Neither pending nor active on all CPUs? */
+ if ((flags & (SOFTINT_PENDING | SOFTINT_ACTIVE)) == 0) {
break;
}
/* Oops, still active. Wait for it to clear. */
Home |
Main Index |
Thread Index |
Old Index