Search Linux Wireless

Re: [PATCH 04/10] nl80211: disallow user requests prior to regulatory_init()

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

 



On Mon, Feb 16, 2009 at 12:49 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Mon, 2009-02-16 at 00:13 -0800, Luis R. Rodriguez wrote:
>
>> >> +     if (!cfg80211_regdomain)
>> >> +             return -EINPROGRESS;
>> >> +
>> >
>> > But that variable access here is racy too.
>>
>> Right.
>>
>> > It might be ok anyway because
>> > the variable can never be NULL again after the first assignment
>>
>> That's what I was going for.
>>
>> >  but in
>> > that case the assignment needs to take care to assign something fully
>> > created ...
>>
>> Can you elaborate on what you mean?
>
> It'd have to be done in a RCU-like fashion,

I see what you're saying.

> unless we only ever use it
> as a bool here?

Its only used as a bool here, mind you __regulatory_hint() does do
mucking with cfg80211 but my patches move the hint to a workqueue so
that locking is now done later through the workqueue so under this new
patch series -- yes cfg80211_regdomain will only be used as a bool.

But come to think of it this is still racy -- think of the cases where
reset_regdomains() is called and the small race between the end of of
those calls and another CPU getting a new user reg hint. So we should
just lock.

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