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.
This commit is contained in:
parent
653b0a4d6a
commit
48f3847902
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user