From mboxrd@z Thu Jan 1 00:00:00 1970 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 681E6C43217 for ; Sat, 19 Nov 2022 02:27:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbiKSC1h (ORCPT ); Fri, 18 Nov 2022 21:27:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235937AbiKSC0l (ORCPT ); Fri, 18 Nov 2022 21:26:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD8338483E; Fri, 18 Nov 2022 18:16:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4AC126280C; Sat, 19 Nov 2022 02:16:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AF01C433D7; Sat, 19 Nov 2022 02:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668824175; bh=+erf4JSvlN1dv6enXI2Pe9KxqxehNWpH2vefNq7EfqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iMax/wr35D/71+nQJm2OpOfW3tpQRLI/LNOuT/ajAM3HIlY+3f7FQMq9s1LwgIxml vc3tHe6GcabcnAvxE4AZwxMsfHkNoDU6lrat0XHMiJBk7RTqExhlEHygImS/PXK70v S8qM9ABlYH2A1HKiC/x9EMBuiRZWTxQ0ON97to+WenIcDDHL9tsfPywMku64oUazah u4u8lz9Pq9fSEoZw3TqlglHO57QJQNIsVe6Ua1Ajo2nEc6TkZK9WAtnt0RN25/9irG Oy2ZmRGRMr/KQD41qFtFeTPLAWjV2RoUOP0s/S4VhNqA91A9X2X9wN9J/Sgw73UCLL qgKNCfAwjLtAQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicolas Cavallari , Johannes Berg , Sasha Levin , johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 3/8] wifi: mac80211: Fix ack frame idr leak when mesh has no route Date: Fri, 18 Nov 2022 21:16:04 -0500 Message-Id: <20221119021610.1775469-3-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221119021610.1775469-1-sashal@kernel.org> References: <20221119021610.1775469-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 06b44c3c831a..71ebdc85755c 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -731,7 +731,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