Search Linux Wireless

Re: Infinite loop in sta_info_debugfs_add_work().

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

 



On Mon, 2008-10-06 at 08:30 -0500, Robin Holt wrote:

> I didn't really need to do much for the printk's in
> ieee80211_sta_debugfs_add().  My printk's in sta_info_debugfs_add_work()
> already told me that sta->local->debugfs.stations is NULL.  

Well yes, but I wanted to know why ieee80211_sta_debugfs_add() doesn't
set debugfs.stations to non-NULL.

> Again, this
> is iwl3945 only after a suspend of a few minutes followed by a resume.
> It happens about 1/3 of the time.

Ok, I have a new suspicion: there seems to be a race condition between
destroying a station (sta_info_destroy) which removes it from debugfs,
and creating a new one with the same MAC address which will ask the
workqueue to add it to debugfs. It clearly is actually possible to run
sta_info_insert(sta2) and consequently sta_info_debugfs_add_work before
sta_info_destroy(sta1), but when they both have the same MAC address
then ieee80211_sta_debugfs_add has to fail.

I don't see much we can do against this, the patch I posted is
definitely needed just in case debugfs gets a new failure mode any time
in the future so I'll post it for inclusion, and the race condition I
described just means that the sta2 won't be in debugfs at all...

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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