Search Linux Wireless

Re: [PATCH 22/24] regulatory: use RCU to protect global and wiphy regdomains

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

 



On Thu, 2012-12-06 at 17:47 +0100, Johannes Berg wrote:

> -	if (nla_put_string(msg, NL80211_ATTR_REG_ALPHA2,
> -			   cfg80211_regdomain->alpha2) ||
> -	    (cfg80211_regdomain->dfs_region &&
> -	     nla_put_u8(msg, NL80211_ATTR_DFS_REGION,
> -			cfg80211_regdomain->dfs_region)))
> -		goto nla_put_failure;
> +	rcu_read_lock();
> +	regdom = rcu_dereference(cfg80211_regdomain);
> +
> +	if (nla_put_string(msg, NL80211_ATTR_REG_ALPHA2, regdom->alpha2) ||
> +	    (regdom->dfs_region &&
> +	     nla_put_u8(msg, NL80211_ATTR_DFS_REGION, regdom->dfs_region)))
> +		goto nla_put_failure_rcu;
>  
>  	if (reg_last_request_cell_base() &&

This causes a locking issue -- mutex is taken in
reg_last_request_cell_base(), so it needs to be before the
rcu_read_lock(). I fixed the version in my mac80211-next.git tree's wip
branch.

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