linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: wireless, fix lock imbalance
@ 2010-01-06 16:35 Jiri Slaby
  2010-01-06 16:35 ` [PATCH 2/2] NET: wireless, fix memory leak Jiri Slaby
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jiri Slaby @ 2010-01-06 16:35 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, linux-kernel

One fail path in cfg80211_wext_siwscan omits to unlock rdev->mtx.
Fix that.

Trigerrable by "Scan for SSID" with long enough SSID (> 32).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 net/wireless/scan.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 12dfa62..9c50c85 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -694,8 +694,10 @@ int cfg80211_wext_siwscan(struct net_device *dev,
 	/* translate "Scan for SSID" request */
 	if (wreq) {
 		if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
-			if (wreq->essid_len > IEEE80211_MAX_SSID_LEN)
-				return -EINVAL;
+			if (wreq->essid_len > IEEE80211_MAX_SSID_LEN) {
+				err = -EINVAL;
+				goto out;
+			}
 			memcpy(creq->ssids[0].ssid, wreq->essid, wreq->essid_len);
 			creq->ssids[0].ssid_len = wreq->essid_len;
 		}
-- 
1.6.5.7


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

end of thread, other threads:[~2010-01-06 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06 16:35 [PATCH 1/2] net: wireless, fix lock imbalance Jiri Slaby
2010-01-06 16:35 ` [PATCH 2/2] NET: wireless, fix memory leak Jiri Slaby
2010-01-06 17:43   ` Luis R. Rodriguez
2010-01-06 19:07   ` Gertjan van Wingerde
2010-01-06 19:14     ` Jiri Slaby
2010-01-06 17:44 ` [PATCH 1/2] net: wireless, fix lock imbalance Luis R. Rodriguez
2010-01-06 19:55 ` John W. Linville
2010-01-06 20:30   ` Jiri Slaby

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