aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/intr_machdep.c5
-rw-r--r--sys/i386/i386/intr_machdep.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/amd64/amd64/intr_machdep.c b/sys/amd64/amd64/intr_machdep.c
index c8284f90c91b0..3f5aa37b29e94 100644
--- a/sys/amd64/amd64/intr_machdep.c
+++ b/sys/amd64/amd64/intr_machdep.c
@@ -171,7 +171,10 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe)
atomic_add_int(&cnt.v_intr, 1);
it = isrc->is_ithread;
- ih = TAILQ_FIRST(&it->it_handlers);
+ if (it == NULL)
+ ih = NULL;
+ else
+ ih = TAILQ_FIRST(&it->it_handlers);
/*
* XXX: We assume that IRQ 0 is only used for the ISA timer
diff --git a/sys/i386/i386/intr_machdep.c b/sys/i386/i386/intr_machdep.c
index c8284f90c91b0..3f5aa37b29e94 100644
--- a/sys/i386/i386/intr_machdep.c
+++ b/sys/i386/i386/intr_machdep.c
@@ -171,7 +171,10 @@ intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe)
atomic_add_int(&cnt.v_intr, 1);
it = isrc->is_ithread;
- ih = TAILQ_FIRST(&it->it_handlers);
+ if (it == NULL)
+ ih = NULL;
+ else
+ ih = TAILQ_FIRST(&it->it_handlers);
/*
* XXX: We assume that IRQ 0 is only used for the ISA timer