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 E49F715C85 for ; Mon, 5 Dec 2022 19:39:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68E93C433C1; Mon, 5 Dec 2022 19:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670269149; bh=dJ/I0wKawby+oC2z/HqjAP/uGjoC/977JpNtRPYryaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wkfPdO+iPjq0RA6JzQZFm5DIGOsBVnbWM8sab/M/h8H33YuYOJ9DswbOnLLHJ1hJ5 EIo4CgbCOOHI0nknGZlL7Oeydm9Kqu/t2kWi9OHCX/NJ8QfjXZoHE7XpgeJpFCz4xn otNJrSvGitf2iQBNI/jmeOqf7QVCwbgnUSpQcMag= 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 5.4 004/153] wifi: mac80211: Fix ack frame idr leak when mesh has no route Date: Mon, 5 Dec 2022 20:08:48 +0100 Message-Id: <20221205190808.875291738@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221205190808.733996403@linuxfoundation.org> References: <20221205190808.733996403@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 d7ae7415d54d..80a83d0d9550 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -720,7 +720,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