看板 DFBSD_commit 關於我們 聯絡資訊
dillon 2005/01/19 09:30:54 PST DragonFly src repository Modified files: sys/net if.c netisr.c netisr.h sys/netinet ip_demux.c Log: 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> Revision Changes Path 1.25 +7 -2 src/sys/net/if.c 1.23 +78 -3 src/sys/net/netisr.c 1.21 +2 -1 src/sys/net/netisr.h 1.30 +2 -2 src/sys/netinet/ip_demux.c http://www.dragonflybsd.org/cvsweb/src/sys/net/if.c.diff?r1=1.24&r2=1.25&f=u http://www.dragonflybsd.org/cvsweb/src/sys/net/netisr.c.diff?r1=1.22&r2=1.23&f=u http://www.dragonflybsd.org/cvsweb/src/sys/net/netisr.h.diff?r1=1.20&r2=1.21&f=u http://www.dragonflybsd.org/cvsweb/src/sys/netinet/ip_demux.c.diff?r1=1.29&r2=1.30&f=u