Search Linux Wireless

Re: [PATCH v2] mac80211: add missing locking in ieee80211_reconfig

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

 



On Tue, 2011-02-08 at 18:43 +0200, Eliad Peller wrote:
> When suspending an associated system, and then resuming,
> the station vif is being reconfigured without taking the
> sdata->u.mgd.mtx lock, which results in the following warning:

...

>  net/mac80211/util.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index cf68700..d036597 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -1210,7 +1210,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
>  		switch (sdata->vif.type) {
>  		case NL80211_IFTYPE_STATION:
>  			changed |= BSS_CHANGED_ASSOC;
> +			mutex_lock(&sdata->u.mgd.mtx);
>  			ieee80211_bss_info_change_notify(sdata, changed);
> +			mutex_unlock(&sdata->u.mgd.mtx);
>  			break;
>  		case NL80211_IFTYPE_ADHOC:
>  			changed |= BSS_CHANGED_IBSS;

Oi, this is a complicated locking rule.

Can you please stick a

lockdep_assert_held(...)

in the right place to make sure we catch it even on drivers that don't
use the probe_req function?

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