Search Linux Wireless

Re: [PATCH 08/10] mac80211: shut down interfaces before destroying interface list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2015-07-08 at 15:41 +0300, Emmanuel Grumbach wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
> 
> If the hardware is unregistered while interfaces are up, mac80211 
> will
> unregister all interfaces, which in turns causes mac80211 to be 
> called
> again to remove them all from the driver and eventually shut down the
> hardware.
> 
> During this shutdown, however, it's currently already unsafe to 
> iterate
> the list of interfaces atomically, as the list is manipulated in an
> unsafe manner. This puts an undue burden on the driver - it must stop
> all its activities before calling ieee80211_unregister_hw(), while in
> the normal stop path it can do all cleanup in the stop method. If, 
> for
> example, it's using the iteration during RX for some reason, it would
> have to stop RX before unregistering to avoid crashes.
> 
> Fix this problem by closing all interfaces before unregistering them.
> This will cause the driver stop to have completed before we 
> manipulate
> the interface list, and after the driver is stopped *and* has called
> ieee80211_unregister_hw() it really musn't be iterating any more as
> the memory will be freed as well.
> 
Applied.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux