Search Linux Wireless

Re: [PATCH v2 1/3] mac80211: check sta_apply_parameters() return value

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

 



On Thu, 2011-12-29 at 14:41 +0200, Eliad Peller wrote:
> Bail out if sta_apply_parameters() returns an error.
> 
> Signed-off-by: Eliad Peller <eliad@xxxxxxxxxx>

Good catch,

Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

> ---
>  net/mac80211/cfg.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 662125d..1c5388d 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1001,6 +1001,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
>  	struct ieee80211_local *local = wiphy_priv(wiphy);
>  	struct sta_info *sta;
>  	struct ieee80211_sub_if_data *vlansdata;
> +	int err;
>  
>  	mutex_lock(&local->sta_mtx);
>  
> @@ -1040,7 +1041,11 @@ static int ieee80211_change_station(struct wiphy *wiphy,
>  		ieee80211_send_layer2_update(sta);
>  	}
>  
> -	sta_apply_parameters(local, sta, params);
> +	err = sta_apply_parameters(local, sta, params);
> +	if (err) {
> +		mutex_unlock(&local->sta_mtx);
> +		return err;
> +	}
>  
>  	if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates)
>  		rate_control_rate_init(sta);


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