* [PATCH] ath5k: avoid leaking mutex in ath5k_config
@ 2009-05-25 19:34 John W. Linville
2009-05-25 21:42 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: John W. Linville @ 2009-05-25 19:34 UTC (permalink / raw)
To: linux-wireless
Cc: Johannes Berg, Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez,
Bob Copeland, ath5k-devel, John W. Linville
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
I lost track of the related bug report -- Johannes, do you recall?
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 \
--
1.6.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath5k: avoid leaking mutex in ath5k_config
2009-05-25 19:34 [PATCH] ath5k: avoid leaking mutex in ath5k_config John W. Linville
@ 2009-05-25 21:42 ` Johannes Berg
2009-05-27 12:38 ` Bob Copeland
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-05-25 21:42 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, Jiri Slaby, Nick Kossifidis, Luis R. Rodriguez,
Bob Copeland, ath5k-devel, Alan Jenkins
[-- Attachment #1: Type: text/plain, Size: 1279 bytes --]
On Mon, 2009-05-25 at 21:34 +0200, John W. Linville wrote:
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> 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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ath5k: avoid leaking mutex in ath5k_config
2009-05-25 21:42 ` Johannes Berg
@ 2009-05-27 12:38 ` Bob Copeland
0 siblings, 0 replies; 3+ messages in thread
From: Bob Copeland @ 2009-05-27 12:38 UTC (permalink / raw)
To: Johannes Berg
Cc: John W. Linville, linux-wireless, Jiri Slaby, Nick Kossifidis,
Luis R. Rodriguez, ath5k-devel, Alan Jenkins
On Mon, May 25, 2009 at 5:42 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Mon, 2009-05-25 at 21:34 +0200, John W. Linville wrote:
>> Reported-by: Johannes Berg <johannes@sipsolutions.net>
>> Signed-off-by: John W. Linville <linville@tuxdriver.com>
>> ---
>> 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
Yes, thanks for catching, looks like it was introduced a few weeks ago
so 2.6.30 is ok.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-27 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-25 19:34 [PATCH] ath5k: avoid leaking mutex in ath5k_config John W. Linville
2009-05-25 21:42 ` Johannes Berg
2009-05-27 12:38 ` Bob Copeland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox