IGMP+WiFi panic on recent kernel - in igmp_fasttimo()
Sam Leffler
sam at freebsd.org
Mon Mar 16 13:14:12 PDT 2009
It is the same issue but the root cause is unclear. There is much code
that does assumes ifma_protospec might be NULL and checks for it. In my
case (creating a wlan ifnet and then destroying it on eject) the patch
below is sufficient. I don't care to dig right now to understand how
this stuff is supposed to work; it should be clear from comments etc but
the code is lacking.
Sam
Coleman Kane wrote:
> The crash that I am seeing (using if_ndis) occurs in igmp_fasttimo...
> This patch doesn't fix that, I'll get more info as soon as I can.
>
> On Sat, 2009-03-14 at 14:06 -0700, Sam Leffler wrote:
>
>> This patches avoids the crash. Not sure how ifma_protospec is supposed
>> to be handled so I'm not committing it.
>>
>> Sam
>>
>> plain text document attachment (mcast.patch)
>> Index: in.c
>> ===================================================================
>> --- in.c (revision 189750)
>> +++ in.c (working copy)
>> @@ -1040,7 +1040,8 @@
>> */
>> IF_ADDR_LOCK(ifp);
>> TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
>> - if (ifma->ifma_addr->sa_family != AF_INET)
>> + if (ifma->ifma_addr->sa_family != AF_INET ||
>> + ifma->ifma_protospec == NULL)
>> continue;
>> inm = (struct in_multi *)ifma->ifma_protospec;
>> LIST_INSERT_HEAD(&purgeinms, inm, inm_link);
>> Index: igmp.c
>> ===================================================================
>> --- igmp.c (revision 189750)
>> +++ igmp.c (working copy)
>> @@ -623,7 +623,8 @@
>> if (igi->igi_version == IGMP_VERSION_3) {
>> IF_ADDR_LOCK(ifp);
>> TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
>> - if (ifma->ifma_addr->sa_family != AF_INET)
>> + if (ifma->ifma_addr->sa_family != AF_INET ||
>> + ifma->ifma_protospec == NULL)
>> continue;
>> inm = (struct in_multi *)ifma->ifma_protospec;
>> if (inm->inm_state == IGMP_LEAVING_MEMBER) {
>> _______________________________________________
>> freebsd-current at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>>
More information about the freebsd-net
mailing list