From patchwork Wed Apr 30 12:58:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 4093591 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 322499F3A0 for ; Wed, 30 Apr 2014 12:58:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6878A2021B for ; Wed, 30 Apr 2014 12:58:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BE8E20220 for ; Wed, 30 Apr 2014 12:58:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759146AbaD3M6a (ORCPT ); Wed, 30 Apr 2014 08:58:30 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:34054 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759127AbaD3M6Y (ORCPT ); Wed, 30 Apr 2014 08:58:24 -0400 Received: by mail-wi0-f170.google.com with SMTP id f8so846313wiw.5 for ; Wed, 30 Apr 2014 05:58:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=I/RJlsvlopWYjD8fZhFbD8z7EnQBStuR8BPouweuEXk=; b=NIW+s1Fp+ee2RmWiz3QRZ2qIL+y6S40XgAmi6EiXYMP19GAdIcvj1KJHVqbap/lA4G B4s2nYmctpb8JlIZhIcmM79/uTpZHkcRA5okvsy/M+C9m+6I7C2tIkjMI4+upFE2tAoY ZDf7mu0reGZanN2iZoDCrtquQvP7GkvKtLx5NJ+S+mqMSZAtXJJUOmk7vYA+cSt7txg9 6ZIR4CcLDg9bv0O7GU2l2QSOwE2nx+B6otO+XGTV8CvnfAzBUHUodUWrYwXBdl87sXQy +M7mFIYGaTmRWusVMFv6qgXC6JnqEY+GCLB2h4QHzYfb3XOMXOf2RRAx1xcfHoGJgsWv mP/Q== X-Gm-Message-State: ALoCoQlLQ6RJBIC+9qV52RDrKihwK0VLnx49TBdVk/WllhFwyjO2wdL30O8LrVE/xc7qab/MBSe6 X-Received: by 10.180.91.1 with SMTP id ca1mr3637236wib.32.1398862702280; Wed, 30 Apr 2014 05:58:22 -0700 (PDT) Received: from muse.amr.corp.intel.com (46-116-82-98.bb.netvision.net.il. [46.116.82.98]) by mx.google.com with ESMTPSA id mw4sm3494801wib.12.2014.04.30.05.58.20 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Apr 2014 05:58:21 -0700 (PDT) From: Eliad Peller To: Johannes Berg Cc: Subject: [PATCH] cfg80211: free sme on connection failures Date: Wed, 30 Apr 2014 15:58:13 +0300 Message-Id: <1398862693-19264-1-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP cfg80211 is notified about connection failures by __cfg80211_connect_result() call. However, this function currently does not free cfg80211 sme. This results in hanging connection attempts in some cases e.g. when mac80211 authentication attempt is denied, we have this function call: ieee80211_rx_mgmt_auth() -> cfg80211_rx_mlme_mgmt() -> cfg80211_process_auth() -> cfg80211_sme_rx_auth() -> __cfg80211_connect_result() but cfg80211_sme_free() is never get called. Fixes: ceca7b712 ("cfg80211: separate internal SME implementation") Cc: stable@vger.kernel.org (3.10+) Signed-off-by: Eliad Peller --- net/wireless/sme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 4bc21a2..1f05cfc 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -236,7 +236,6 @@ void cfg80211_conn_work(struct work_struct *work) NULL, 0, NULL, 0, WLAN_STATUS_UNSPECIFIED_FAILURE, false, NULL); - cfg80211_sme_free(wdev); } wdev_unlock(wdev); } @@ -649,6 +648,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, cfg80211_unhold_bss(bss_from_pub(bss)); cfg80211_put_bss(wdev->wiphy, bss); } + cfg80211_sme_free(wdev); return; }