From patchwork Wed Jan 6 16:35:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 71362 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o06HaGgL005574 for ; Wed, 6 Jan 2010 17:36:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932471Ab0AFRgM (ORCPT ); Wed, 6 Jan 2010 12:36:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932407Ab0AFRgI (ORCPT ); Wed, 6 Jan 2010 12:36:08 -0500 Received: from smtp.mujha-vel.cz ([81.30.225.246]:47629 "EHLO smtp.mujha-vel.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932451Ab0AFRgG (ORCPT ); Wed, 6 Jan 2010 12:36:06 -0500 Received: from [217.66.174.142] (helo=localhost.localdomain) by smtp.mujha-vel.cz with esmtp (Exim 4.63) (envelope-from ) id 1NSYrJ-0005dw-8w; Wed, 06 Jan 2010 17:35:45 +0100 From: Jiri Slaby To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] net: wireless, fix lock imbalance Date: Wed, 6 Jan 2010 17:35:42 +0100 Message-Id: <1262795743-15009-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.6.5.7 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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; }