From patchwork Fri Sep 2 14:11:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 602643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 541FEECAAD5 for ; Fri, 2 Sep 2022 14:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237091AbiIBOuD (ORCPT ); Fri, 2 Sep 2022 10:50:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236350AbiIBOti (ORCPT ); Fri, 2 Sep 2022 10:49:38 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 228EA135D29 for ; Fri, 2 Sep 2022 07:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Dsn2QMq9+S5IlN6y1o2tvi/ltCs0rYEEpGK2/In5k1U=; t=1662127883; x=1663337483; b=SrAs31VO18crpV/wlS4LOtBzXRh9uDQWqSpyt0BnheM6YkO 2gn3Hi17zJ6zJsckmv8fwgI5EJTp0CllbPV93sVp10rzf4zqpxddsyC8wB0Tply1/TywDMKsrcfC2 ljrUeWUwU464FS4A3hpe7z79r3qExrcuLJ+YMEV11vaBjFPmWeh1jkDI1S6FCOGTKv/6YP/+xEXFv j3zh52yoNizIZSdg7GC/sf1SEybBUpBULBTEk9k7uIGtb//SShoMPILsSjab+dofbbxJWlJXp5L97 uDGFexKjmjjSIS/uXXvksfgsd3QTpa054/b+TeA/JGrPirghxPJQl+lUto+WdrbQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oU7OC-006Cfn-1U; Fri, 02 Sep 2022 16:11:20 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 2/2] wifi: mac80211: mlme: release deflink channel in error case Date: Fri, 2 Sep 2022 16:11:15 +0200 Message-Id: <20220902161058.c6e40e0c38c1.I97c1d24d4f526d3d5e41398a2a56de7255f725c2@changeid> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902161058.7d5f399c88d3.I1c257b1c7a8309a9f9b96654c0e71bcf4b247b98@changeid> References: <20220902161058.7d5f399c88d3.I1c257b1c7a8309a9f9b96654c0e71bcf4b247b98@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg In the prep_channel error case we didn't release the deflink channel leaving it to be left around. Fix that. Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4555d23b009e..13d075e6a318 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -6549,6 +6549,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, return 0; out_err: + ieee80211_link_release_channel(&sdata->deflink); ieee80211_vif_set_links(sdata, 0); return err; }