Search Linux Wireless

Re: [PATCH v7] nl80211: Stop scheduled scan if netlink client disappears

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

 



On ke, 2014-11-26 at 10:32 +0100, Johannes Berg wrote:
> On Wed, 2014-11-26 at 11:07 +0200, Jukka Rissanen wrote:
> > An attribute NL80211_ATTR_SOCKET_OWNER can be set by the scan initiator.
> > If present, the attribute will cause the scan to be stopped if the client
> > dies.
> > 
> > Signed-off-by: Jukka Rissanen <jukka.rissanen@xxxxxxxxxxxxxxx>
> > ---
> > Hi,
> > 
> > v7:
> > - convert the cfg80211_sched_scan_request to __rcu pointer in order
> >   to avoid races when accessing it
> 
> You totally need to revisit how to use RCU.

Yes, probably. This is very new stuff to me :)

> 
> Just some examples:
>  * don't synchronize_rcu() after assignment - what did you do that for?

Following the examples described in Documentation/RCU/whatisRCU.txt

>  * don't use rcu_read_lock() when you already have the write lock (rtnl)
>  * don't use rcu_access_pointer(), use
>     - local variables
>     - rcu_dereference_protected() (or rather rtnl_dereference())
>     - rcu_dereference()
>  * actually fix it to assign the values before rcu_assign_pointer() so
> they're
>    all published together ...
> 
> Also, please make that a separate patch so it isn't mixed with the
> functional changes.
> 
> johannes
> 

Jukka


--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux