Search Linux Wireless

Re: [RFC] cfg80211: fix race between sysfs and cfg80211

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

 



On Sat, 2010-07-17 at 05:13 +0200, Maxime Bizon wrote:
> device_add() is called before adding the phy to the cfg80211 device
> list.
> 
> So if a userspace program uses sysfs uevents to detect new phy
> devices, and queries nl80211 to get phy info, it can get ENODEV even
> though the phy exists in sysfs.
> 
> An easy workaround is to hold the cfg80211 mutex until the phy is
> present both in sysfs and cfg80211 device list.

Maybe we should hold the mutex around the debugfs stuff as well? Then
tools could even access that race-free, and we can simplify the code by
having an "out_unlock" label.

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 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