* [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info()
@ 2009-06-02 20:28 Luis R. Rodriguez
2009-06-02 20:34 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-06-02 20:28 UTC (permalink / raw)
To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
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();
}
put_bss:
--
1.6.0.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info()
2009-06-02 20:28 [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info() Luis R. Rodriguez
@ 2009-06-02 20:34 ` Johannes Berg
2009-06-02 20:43 ` Luis R. Rodriguez
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-06-02 20:34 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
On Tue, 2009-06-02 at 16:28 -0400, Luis R. Rodriguez wrote:
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
> 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.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info()
2009-06-02 20:34 ` Johannes Berg
@ 2009-06-02 20:43 ` Luis R. Rodriguez
2009-06-02 20:53 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-06-02 20:43 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, linux-wireless
On Tue, Jun 2, 2009 at 1:34 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2009-06-02 at 16:28 -0400, Luis R. Rodriguez wrote:
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
>> ---
>> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info()
2009-06-02 20:43 ` Luis R. Rodriguez
@ 2009-06-02 20:53 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-06-02 20:53 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
On Tue, 2009-06-02 at 13:43 -0700, Luis R. Rodriguez wrote:
> 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.
Yeah, but that's a corner case we can only hit via this function racing
against itself, if that's even possible.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-02 20:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02 20:28 [PATCH] mac80211: add missing RCU lock/unlock on ieee80211_rx_bss_info() Luis R. Rodriguez
2009-06-02 20:34 ` Johannes Berg
2009-06-02 20:43 ` Luis R. Rodriguez
2009-06-02 20:53 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).