diff options
author | tanimura <tanimura@FreeBSD.org> | 2000-12-31 01:31:55 +0000 |
---|---|---|
committer | tanimura <tanimura@FreeBSD.org> | 2000-12-31 01:31:55 +0000 |
commit | 48f3847902ba1a79991562090f4bdd5b76c5b0d4 (patch) | |
tree | fac2345c9a07d2f8c2f6ae255d82cf08802478ea /sys | |
parent | 653b0a4d6a8b356299c40d77ede08b6896048507 (diff) | |
download | FreeBSD-src-48f3847902ba1a79991562090f4bdd5b76c5b0d4.zip FreeBSD-src-48f3847902ba1a79991562090f4bdd5b76c5b0d4.tar.gz |
Ignore a net interrupt if the corresponding handler is not
registered.
This fixes panic on my laptop where a spurious arp packet
is received when arp is not ready to run.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_intr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 519c3cf..f25cf87 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -311,7 +311,10 @@ swi_net(void *dummy) bits = atomic_readandclear_int(&netisr); while ((i = ffs(bits)) != 0) { i--; - netisrs[i](); + if (netisrs[i] != NULL) + netisrs[i](); + else + printf("swi_net: unregistered isr number: %d.\n", i); bits &= ~(1 << i); } } |