On Tue, Aug 01, 2017 at 02:23:42PM +0100, Laurence Tratt wrote:
> >Synopsis:
>     iwm: could not add MAC context
> >Category:
>     kernel
> >Environment:
>       System      : OpenBSD 6.1
>       Details     : OpenBSD 6.1-current (GENERIC.MP) #30: Mon Jul 31 22:48:24 
> MDT 2017
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
>     On the Jul 31st snapshot, iwm panics with heavy traffic on a WPA2 
> enterprise
>     network. So far I haven't seen this on a non-WPA2 network. Screenshot of 
> the
>     panic:
> 
>       https://imagebin.ca/v/3VNEJhDM7fas
> 
>     In case it's useful (though I guess it isn't), here's the trace for the 
> other
>     CPUs:
> 
>       https://imagebin.ca/v/3VNEqn6y9s6N

This is a driver bug. It looks like a race between code which resets
the device and code which acts upon frames received from the AP.
A proper fix is still in progress, but for now this is the best
fix/workaround I can offer:

Index: if_iwm.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
retrieving revision 1.204
diff -u -p -r1.204 if_iwm.c
--- if_iwm.c    23 Jul 2017 13:51:11 -0000      1.204
+++ if_iwm.c    2 Aug 2017 18:05:56 -0000
@@ -5869,6 +5869,12 @@ iwm_newstate_task(void *psc)
                return;
        }
 
+       /* XXX Avoid invalid transition due to race conditions. */
+       if (ostate == IEEE80211_S_INIT && nstate > IEEE80211_S_SCAN) {
+               splx(s);
+               return;
+       }
+
        if (ostate == IEEE80211_S_SCAN)
                iwm_led_blink_stop(sc);
 

Reply via email to