Search Linux Wireless

Re: [PATCH 1/5] ath9k_htc: Lock sta_notify() callback

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

 



Johannes Berg wrote:
> On Tue, 2010-05-11 at 16:24 +0530, Sujith.Manoharan@xxxxxxxxxxx wrote:
> > Since ->sta_notify() can sleep, protect
> > the callback with a mutex.
> 
> While this may be a correct change, it's not a correct description :)
> 
> You should be locking _data_, not _code_, and due to mac80211 the
> callback cannot be invoked twice at the same time anyway.

It protects all the binary data between lock and unlock. :-)

I encountered a problem with sta_notify() with a script doing
a load/scan/connect/unload cycle and NetworkManager also running,
doing its own scan/connect processing. And at some point,
ath9k_htc_remove_station() failed. Which led me to suspect overlapping
calls to sta_notify().

I do see sta_mtx being taken at all the places where sta_remove() is called
in mac80211, so am not sure how I managed to hit it.

Sujith
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux