Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 fix: "intrctl list" causes panic when the d...
details: https://anonhg.NetBSD.org/src/rev/6d7f9cded946
branches: trunk
changeset: 340896:6d7f9cded946
user: knakahara <knakahara%NetBSD.org@localhost>
date: Fri Oct 09 12:56:02 2015 +0000
description:
fix: "intrctl list" causes panic when the device using pci_intr_alloc() shares IRQ.
diffstat:
sys/arch/x86/x86/intr.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 39ab61f373fc -r 6d7f9cded946 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c Fri Oct 09 07:23:33 2015 +0000
+++ b/sys/arch/x86/x86/intr.c Fri Oct 09 12:56:02 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.88 2015/10/06 09:44:31 knakahara Exp $ */
+/* $NetBSD: intr.c,v 1.89 2015/10/09 12:56:02 knakahara Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.88 2015/10/06 09:44:31 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.89 2015/10/09 12:56:02 knakahara Exp $");
#include "opt_intrdebug.h"
#include "opt_multiprocessor.h"
@@ -1007,6 +1007,21 @@
/* NOTREACHED */
}
+ /*
+ * If the establishing interrupt uses shared IRQ, the interrupt uses
+ * "ci->ci_isources[slot]" instead of allocated by the establishing
+ * device's pci_intr_alloc() or this function.
+ */
+ if (source->is_handlers != NULL) {
+ struct intrsource *isp;
+
+ SIMPLEQ_FOREACH(isp, &io_interrupt_sources, is_list) {
+ if (strncmp(intrstr, isp->is_intrid, INTRIDBUF - 1) == 0
+ && isp->is_handlers == NULL)
+ intr_free_io_intrsource_direct(isp);
+ }
+ }
+
/*
* We're now committed. Mask the interrupt in hardware and
* count it for load distribution.
Home |
Main Index |
Thread Index |
Old Index