Search Linux Wireless

Re: [PATCH v2] mac80211: Optimize sta lookup for many VIFs

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

 



The RCU logic isn't quite right yet:

> @@ -1312,7 +1313,11 @@ static int ieee80211_change_station(struct wiphy *wiphy,
>  			prev_4addr = true;
>  		}
>  
> +		some_sta = rcu_dereference(sta->sdata->some_sta);
> +		if (some_sta == sta)
> +			rcu_assign_pointer(sta->sdata->some_sta, NULL);

That must be under mutex since you also assign below, therefore you
should use rcu_dereference_protected()

>  		sta->sdata = vlansdata;
> +		rcu_assign_pointer(sta->sdata->some_sta, sta);

> +++ b/net/mac80211/sta_info.c
> @@ -67,7 +67,11 @@
>  static int sta_info_hash_del(struct ieee80211_local *local,
>  			     struct sta_info *sta)
>  {
> -	struct sta_info *s;
> +	struct sta_info *s, *some_sta;
> +
> +	some_sta = rcu_dereference(sta->sdata->some_sta);
> +	if (some_sta == sta)
> +		rcu_assign_pointer(sta->sdata->some_sta, NULL);

same here.

johannes

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