Search Linux Wireless

Re: [PATCH 01/13 v2] o11s: (nl80211/cfg80211) support for mesh interfaces and mesh paths

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

 



On Fri, 2008-02-29 at 17:31 -0800, Luis Carlos Cobo wrote:
> On Mon, 2008-02-25 at 17:03 +0100, Johannes Berg wrote:
> > Can you do that in both nl80211 and mac80211 for both STAs and paths?
> > Look at net/netlink/genetlink.c ctrl_dumpfamily() for an example.
> 
> I'm not sure I completely get what changes are necessary.
> 
> What I understand is that I should acquire (if idx == 0) and release
> (just before returning -ENOENT) the rtnl_lock() from within (mac80211 or
> equivalent) dump_station function instead of from nl80211_dump_station.
> Is this the whole idea?

I think it's a bit more complicated because nl80211's dump_station() can
also be invoked multiple times.

To guarantee the cfg80211 rtnl_lock() promise, dump_station() should
acquire the rtnl and all locks it needs when it first enters the
function (oh. that's actually a bug in the other functions too, they
should acquire the mutex conditionally, will fix).

mac80211 also needs to acquire the sta_lock because otherwise stations
can be added or removed while dumping.

I suppose the struct netlink_callback needs to be passed through to
mac80211's dump function with the limitation that the first two entries
are already used by nl80211...

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