Search Linux Wireless

Re: [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info()

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

 



On Tue, Jun 2, 2009 at 1:34 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> On Tue, 2009-06-02 at 16:28 -0400, Luis R. Rodriguez wrote:
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
>> ---
>>  net/mac80211/ibss.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
>> index 0b30277..446cada 100644
>> --- a/net/mac80211/ibss.c
>> +++ b/net/mac80211/ibss.c
>> @@ -365,7 +365,9 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
>>                      sdata->dev->name, mgmt->bssid);
>>  #endif
>>               ieee80211_sta_join_ibss(sdata, bss);
>> +             rcu_read_lock();
>>               ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa, supp_rates);
>> +             rcu_read_unlock();
>>       }
>
> I see no reason for this to be necessary.

Hm yeah, I failed to see it doesn't get the sta before allocating it
and/or adding it. Is that right for this particular case? If the sta
does exist we wouldn't have set up the things for it that
ieee80211_ibss_add_sta() is setting.

  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