From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47B8515C82 for ; Mon, 5 Dec 2022 19:11:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE1BCC433D6; Mon, 5 Dec 2022 19:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670267514; bh=2529DVPoIVbu5ClHjkKmG0Cv3rWy7zn2UNULc+K9M48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQ1CzjNk9casu0XPKJgyqyS4UnzAFel7RBwaql9sLkqoySXG3KJzTUJzcLYFNM4AX alk51pONCct7sVkAQ7bls7ZiuYCbWdD0TEKSHSJhFlmSu5Tmhq1Yao5fJtb5iDdy+t 12EedzOZ9KOwkTfiwDrNq3u3eq0YCm5nGiB9TyM8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolas Cavallari , Johannes Berg , Sasha Levin Subject: [PATCH 4.9 03/62] wifi: mac80211: Fix ack frame idr leak when mesh has no route Date: Mon, 5 Dec 2022 20:09:00 +0100 Message-Id: <20221205190758.196428075@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221205190758.073114639@linuxfoundation.org> References: <20221205190758.073114639@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Nicolas Cavallari [ Upstream commit 39e7b5de9853bd92ddbfa4b14165babacd7da0ba ] When trying to transmit an data frame with tx_status to a destination that have no route in the mesh, then it is dropped without recrediting the ack_status_frames idr. Once it is exhausted, wpa_supplicant starts failing to do SAE with NL80211_CMD_FRAME and logs "nl80211: Frame command failed". Use ieee80211_free_txskb() instead of kfree_skb() to fix it. Signed-off-by: Nicolas Cavallari Link: https://lore.kernel.org/r/20221027140133.1504-1-nicolas.cavallari@green-communications.fr Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mesh_pathtbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 30a95a2ff196..78945dc9dcd7 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -794,7 +794,7 @@ int mesh_path_send_to_gates(struct mesh_path *mpath) void mesh_path_discard_frame(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) { - kfree_skb(skb); + ieee80211_free_txskb(&sdata->local->hw, skb); sdata->u.mesh.mshstats.dropped_frames_no_route++; } -- 2.35.1