]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Deal with the case where ifma_protospec may be NULL, during
authorBruce M Simpson <bms@FreeBSD.org>
Tue, 17 Mar 2009 14:41:54 +0000 (14:41 +0000)
committerBruce M Simpson <bms@FreeBSD.org>
Tue, 17 Mar 2009 14:41:54 +0000 (14:41 +0000)
commit56663a40eb3a308c31f9bcc88216cf4e58d6d493
tree4444692ce50888b76520e75f771088f2323c6442
parent450fa4f83af9ff6c34a5e8e9e42ea942fe5682be
Deal with the case where ifma_protospec may be NULL, during
any IPv4 multicast operations which reference it.

There is a potential race because ifma_protospec is set to NULL
when we discover the underlying ifnet has gone away. This write
is not covered by the IF_ADDR_LOCK, and it's difficult to widen
its scope without making it a recursive lock. It isn't clear why
this manifests more quickly with 802.11 interfaces, but does not
seem to manifest at all with wired interfaces.

With this change, the 802.11 related panics reported by sam@
and cokane@ should go away. It is not the right fix, that requires
more thought before 8.0.

Idea from: sam
Tested by: cokane
sys/netinet/igmp.c
sys/netinet/in.c
sys/netinet/in_mcast.c