Hi Johannes, On to, 2014-11-20 at 16:14 +0100, Johannes Berg wrote: > On Thu, 2014-11-20 at 13:32 +0200, Jukka Rissanen wrote: > > > - moved owner netlink port id from cfg80211_sched_scan_request to > > rdev in order to avoid possible races > > How does that really help though? You're not really locking it anyway. > > I think you should consider keeping it inside the sched_scan_request, > but maybe make that an __rcu pointer. > > Your patch also still has the problem I pointed out to you before - you > can get the following sequence of events: > > start_sched_scan (owner=true) > close socket - schedule worker > start_sched_scan (from another socket, owner doesn't matter) If I am reading the code correctly from nl80211.c:nl80211_start_sched_scan() this socket will get -EINPROGRESS. Only after the worker has finished and called __cfg80211_stop_sched_scan() will the other socket able to start a new scheduled scan. Or I might have just missed some important detail here :) > run worker - cancels the new sched_scan > > You need to make sure the worker is flushed in start_sched_scan or so, > which might require RTNL work there or something. > > johannes > Cheers, 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