Search Linux Wireless

Re: [PATCH] wext: allow wext users without rtnl

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

 



On Wed, 2007-04-18 at 14:04 -0700, Stephen Hemminger wrote:

> NACK Conditional locking is bad design.
> Either lock or not, make up your mind and fix the devices.

Ok looking at this again.

We essentially have the problem that all wext users assume that the rtnl
is held during wext calls, which is mostly required right now because
they are being passed a netdev pointer and no reference is taken. Also,
there shouldn't be multiple wext calls in progress at the same time.

In cfg80211, I decided that holding the rtnl would be mostly pointless
since configuration of a wireless device can't race against the other
config ioctls that could be done. I'd have to look at the details to see
if changing the interface mac address and setting a BSSID on it could
clash.

Hence, since cfg80211 doesn't hold rtnl, to avoid ABBA style deadlocks
wext entry points to the code need to be changed to not hold rtnl
either. Or cfg80211 needs to be changed to hold rtnl.

I'm not entirely opposed to making cfg80211 hold rtnl for configuration,
it just seems pointless to block configuration of different devices
against each other when even a for a single item it shouldn't matter.
Then again, holding rtnl in cfg80211 would simplify some things because
we could pass in a netdev pointer instead of the ifindex for example.

If you think I can justify holding rtnl in cfg80211 I'm certainly
willing to change that. Global locks are just too suspicious to me ;)

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