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 059E715C82 for ; Mon, 5 Dec 2022 19:14:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80184C433D6; Mon, 5 Dec 2022 19:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670267676; bh=5vLilRi43yM10RvlaRVrv82W+ZfVreExLZ+l9RTljCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EoSl9zhNzEbX6VSsn2IvEMbk73JzcD8fEyFUMCkuNRhf+IoBY8LP5sUjUXmqIGq9S QKc/BxsONWIbHIsI8PGVzl7hJ7kqmj2YAI4sUMMQJu5WC7JRr/zqYHMQJInw3MG2fk wlw0j78lvA5vLOjXfBT6uv3JsJGIFfKlptiyJAEM= 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.14 03/77] wifi: mac80211: Fix ack frame idr leak when mesh has no route Date: Mon, 5 Dec 2022 20:08:54 +0100 Message-Id: <20221205190800.986908908@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221205190800.868551051@linuxfoundation.org> References: <20221205190800.868551051@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 54d44836dd28..e4c62b0a3fdb 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -793,7 +793,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