When a PCMCIA networking card is removed the IF code may free() the network
interface before processing has completed on pending packets, leaving a
dangling pointer in the mbuf and causing a crash.
The two solutions are to either ref-count the network interface on a
per-packet basis or to synchronize against consumers of the packet.
ref-counting is very expensive in an MP system so we have chosen to
synchronize against consumers by sending a NOP message to all protocol
processing threads and waiting for it to be replied. This only occurs when
an interface is being brought down and is not expected to introduce any
performance issues.
Crash-Reported-by: Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>