From patchwork Thu Oct 27 14:01:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 619494 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 0AE8CFA3740 for ; Thu, 27 Oct 2022 14:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235687AbiJ0OC3 (ORCPT ); Thu, 27 Oct 2022 10:02:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235652AbiJ0OC2 (ORCPT ); Thu, 27 Oct 2022 10:02:28 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9626718024D for ; Thu, 27 Oct 2022 07:02:25 -0700 (PDT) Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.103]) with ESMTPSA (Nemesis) id 1M5wgF-1ohBZc1JO7-007Sk9; Thu, 27 Oct 2022 16:02:23 +0200 From: Nicolas Cavallari To: Johannes Berg Cc: linux-wireless@vger.kernel.org Subject: [PATCH] wifi: mac80211: Fix ack frame idr leak when mesh has no route Date: Thu, 27 Oct 2022 16:01:33 +0200 Message-Id: <20221027140133.1504-1-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:XmCcPyxi5aQ56UzM7bH9cqRAAkX8eEZWiqC57yfu3xobouCQkkb z60/l8YcxCvuI1kTC98zMz/wcvADBodO1cO1ppVHKYL4jlRX8zTJDmW1xPXByjyGRQYAI1f owzUFjDD7rJjrQWjZHPzocmeZ81ByOcwqwC4KCBMd4TcDXcTPLbfQpctwHteMKpBWzcHMW2 2DfDwMNlhG8UV1nCeEe1w== X-UI-Out-Filterresults: notjunk:1;V03:K0:kDay+5m5ejo=:o2HIzaU/xrhjR9uQVsAB19 X5C9IU9DL1xYKDMHZDpT0AHSwGJgxnOTKE0kXLa3nOBHUngPeC4fNobWXonROnQmfO+i6zF6E 6x/BJ0mFnAbxGButTTb52aMW7g4bz82Uy2ZAXQyKEYjOoziK+ZA6+3x6uVZoJVo5IPGZuAwt8 rH7zL27Qw0U/G94WuHwJaOJJc8pN6Lkj7h9bPOdXfAmDnlFLFVdFkBXZEZ9P//kLp5KBL644i 3/Wga/SN9jIFsRieCrH6vdIabgOT36DmkQgpmcJ9ZPpKWBHBiB1lQl3JR1UoJ14dkvXoOQYH9 sFaJYOCfDuiOrcOJunpfi9MzCeMuzZCqyf+waOvl7wBlDF9RwopLVngbqOkSClhsyJNhKHxCT A2n6T9UtL8I5MK+y2Gezo8LcfPPtBRH76MLmrtl2ICxGrwiEiGaCeS0Q0eaIy36ty0vHpeENJ nLJ+kfRKWjXLilHt52y7o+8U9Rj+1zX+Zya/KsGdGTX5p5LAVvjdW7buVbgSpXJb+BJzDPorQ wjlNwHxVej4zgXS/dnWVSQ5N+VVrWZDoSSp7S9mdgYRnRrg7DizixGAh4aNPxKkJmUNrw7EAH B5FsIAIsIU9FggyXW5wwI5zFEPfGjoMJNQauXDQUylHR2tlOXB5W++42QPQd4AQzi+D1MvLF5 j+VJv4Onls841Fs6UTynEofbNparPLM6Nmf/KHyaqyUZK5JTFQo6n3egVa83KdC6/bc7AE6ko Jq52iWlKSYC8qwHN860uf5UMU809520VmIj9+VBnes55Rccl8KWjePQr3FEEuxqLAUzEulcNU 7Dkyx7KOVfeYuF6oiuMSQqRme9+rMg6MitQnLTUkmBwhFENo3A= Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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 acc1c299f1ae..69d5e1ec6ede 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -710,7 +710,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++; }