Search Linux Wireless

Re: [PATCH] ath5k: avoid leaking mutex in ath5k_config

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

 



On Mon, 2009-05-25 at 21:34 +0200, John W. Linville wrote:
> Reported-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
> ---
> I lost track of the related bug report -- Johannes, do you recall?

Thanks for fixing -- the report is Alan's (CC'ed) at
http://article.gmane.org/gmane.linux.kernel.wireless.general/33449

johannes

>  drivers/net/wireless/ath/ath5k/base.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
> index fb51937..dd6dc8d 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -2779,7 +2779,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
>  
>  	ret = ath5k_chan_set(sc, conf->channel);
>  	if (ret < 0)
> -		return ret;
> +		goto unlock;
>  
>  	if ((changed & IEEE80211_CONF_CHANGE_POWER) &&
>  	(sc->power_level != conf->power_level)) {
> @@ -2808,8 +2808,9 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
>  	 */
>  	ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
>  
> +unlock:
>  	mutex_unlock(&sc->lock);
> -	return 0;
> +	return ret;
>  }
>  
>  #define SUPPORTED_FIF_FLAGS \

Attachment: signature.asc
Description: This is a digitally signed message part


[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