netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme
@ 2006-12-03  7:42 Maxime Austruy
  2006-12-03 16:23 ` Larry Finger
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Austruy @ 2006-12-03  7:42 UTC (permalink / raw)
  To: linville; +Cc: netdev, linux-kernel


Found a hang while playing with wpa_supplicant and a zd1211 usb adapter
using linux 2.6.19.  The problem is that ieee80211softmac_wx_set_mlme
forgets to release a mutex when mlme->cmd is IW_MLME_DEAUTH.  The fix
below allows me to kill wpa_supplicant and to restart it without having
to reboot the machine. FWIW, it seems that the problem was introduced
between 2.6.19-rc2 and 2.6.19-rc3 when this function was changed to use
a mutex.

Signed-off-by: Maxime Austruy <maxime@tralhalla.org>

--
 net/ieee80211/softmac/ieee80211softmac_wx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux.orig/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-11-29 13:57:37.000000000 -0800
+++ linux/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-12-02 22:58:20.000000000 -0800
@@ -495,7 +495,8 @@ ieee80211softmac_wx_set_mlme(struct net_
 			printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n");
 			goto out;
 		}
-		return ieee80211softmac_deauth_req(mac, net, reason);
+		err =  ieee80211softmac_deauth_req(mac, net, reason);
+		goto out;
 	case IW_MLME_DISASSOC:
 		ieee80211softmac_send_disassoc_req(mac, reason);
 		mac->associnfo.associated = 0;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme
  2006-12-03  7:42 [PATCH] softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme Maxime Austruy
@ 2006-12-03 16:23 ` Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2006-12-03 16:23 UTC (permalink / raw)
  To: Maxime Austruy; +Cc: linville, netdev, linux-kernel

Maxime Austruy wrote:
> Found a hang while playing with wpa_supplicant and a zd1211 usb adapter
> using linux 2.6.19.  The problem is that ieee80211softmac_wx_set_mlme
> forgets to release a mutex when mlme->cmd is IW_MLME_DEAUTH.  The fix
> below allows me to kill wpa_supplicant and to restart it without having
> to reboot the machine. FWIW, it seems that the problem was introduced
> between 2.6.19-rc2 and 2.6.19-rc3 when this function was changed to use
> a mutex.
> 
> Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> 
> --
>  net/ieee80211/softmac/ieee80211softmac_wx.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- linux.orig/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-11-29 13:57:37.000000000 -0800
> +++ linux/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-12-02 22:58:20.000000000 -0800
> @@ -495,7 +495,8 @@ ieee80211softmac_wx_set_mlme(struct net_
>  			printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n");
>  			goto out;
>  		}
> -		return ieee80211softmac_deauth_req(mac, net, reason);
> +		err =  ieee80211softmac_deauth_req(mac, net, reason);
> +		goto out;
>  	case IW_MLME_DISASSOC:
>  		ieee80211softmac_send_disassoc_req(mac, reason);
>  		mac->associnfo.associated = 0;
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme
@ 2006-12-03 16:40 Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2006-12-03 16:40 UTC (permalink / raw)
  To: John Linville, chrisw-69jw2NvuJkxg9hUCZPvPmw,
	stable-DgEjT+Ai2ygdnm+yROfE0A
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, maxime-+3Uz/VIkGlWGglJvpFV4uA,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, Michael Buesch,
	Stefano Brivio

From: Maxime Austruy <maxime-+3Uz/VIkGlWGglJvpFV4uA@public.gmane.org>

Routine ieee80211softmac_wx_set_mlme has one return that fails
to release a mutex acquired at entry.

Signed-off-by: Maxime Austruy <maxime-+3Uz/VIkGlWGglJvpFV4uA@public.gmane.org>
Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
---

John and Chris,

This error was introduced in the 2.6.19-rxX series and must be applied
to 2.6.19-stable and wireless-2.6.

Larry

 net/ieee80211/softmac/ieee80211softmac_wx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-11-29 13:57:37.000000000 -0800
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c	2006-12-02 22:58:20.000000000 -0800
@@ -495,7 +495,8 @@ ieee80211softmac_wx_set_mlme(struct net_
 			printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n");
 			goto out;
 		}
-		return ieee80211softmac_deauth_req(mac, net, reason);
+		err =  ieee80211softmac_deauth_req(mac, net, reason);
+		goto out;
 	case IW_MLME_DISASSOC:
 		ieee80211softmac_send_disassoc_req(mac, reason);
 		mac->associnfo.associated = 0;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-03 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-03  7:42 [PATCH] softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme Maxime Austruy
2006-12-03 16:23 ` Larry Finger
  -- strict thread matches above, loose matches on Subject: below --
2006-12-03 16:40 Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).