Search Linux Wireless

Re: [RFC] mac80211: use rcu_read_lock before sta_info_get

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

 



On Sunday 25 December 2011 16:09:12 Mohammed Shafi Shajakhan wrote:
> @@ -1385,7 +1385,9 @@ void ieee80211_beacon_connection_loss_work(struct work_struct *work)
>  	struct sta_info *sta;
>  
>  	if (ifmgd->associated) {
> +		rcu_read_lock();
>  		sta = sta_info_get(sdata, ifmgd->bssid);
> +		rcu_read_unlock();
>  		if (sta)
>  			sta->beacon_loss_count++;
>  	}

uh, I think it should be:

> +		rcu_read_lock();
>  		sta = sta_info_get(sdata, ifmgd->bssid);
>  		if (sta)
>  			sta->beacon_loss_count++;
> +		rcu_read_unlock();

Since we update a member of the rcu-protected "sta"
reference.

Regards,
	Chr
--
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