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 2810627FD4F; Wed, 23 Apr 2025 15:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745421858; cv=none; b=uREMfdRRhpvPoj1AWvLGrYKijj5PTRnJ758eh4K7p4oYwrATiSCdyd3eqLkGejx5Zw7SmE+lH8XrCtctsQ0Y7UYsB28YmUWvbxc5bMQefQoww50nPhv4i0bIxzbeC8c9S4SjGFnVh1l0t5eVtJxTgrEmoigg8ZrZBvQ5p8ShAnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745421858; c=relaxed/simple; bh=UOHC1jev8ANNVU5EObjmQn7tzb4wxrDoRzGS5Awaes4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UebjuR7K48mXu7mpxXDdDs03huI50eWled3CGdVG5jS21CI9bdemwwoH4LICh/AacBXaNfHIQzMwa9Y+BypTPqRviLv64Aor+9DpU78bMCauQ016Rr5rLthtzhWHv5aPfFYGIWCmkLFEX+LYcmSghyrOMngFj0i4QuwVWq0dSVI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nBWPZUdA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nBWPZUdA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADFE7C4CEE2; Wed, 23 Apr 2025 15:24:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745421858; bh=UOHC1jev8ANNVU5EObjmQn7tzb4wxrDoRzGS5Awaes4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nBWPZUdAilpkhvsUJKFPc64vZr3M1ZloHY2pupAHhR9M/n3XuXEr0Xntyh1oMR4ro EEdskoB0NZXpNXbG6RZ0GFx+UNoM9lLasmb+4oOHu83kG7h778z32uCu9+Pu2129xI DdT1tof3b7ixiW8iAuiZxBocmfOmHSrJ4dS/zjL4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Abdun Nihaal , Michael Nemanov , Johannes Berg , Sasha Levin Subject: [PATCH 6.1 169/291] wifi: wl1251: fix memory leak in wl1251_tx_work Date: Wed, 23 Apr 2025 16:42:38 +0200 Message-ID: <20250423142631.294737333@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250423142624.409452181@linuxfoundation.org> References: <20250423142624.409452181@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Abdun Nihaal [ Upstream commit a0f0dc96de03ffeefc2a177b7f8acde565cb77f4 ] The skb dequeued from tx_queue is lost when wl1251_ps_elp_wakeup fails with a -ETIMEDOUT error. Fix that by queueing the skb back to tx_queue. Fixes: c5483b719363 ("wl12xx: check if elp wakeup failed") Signed-off-by: Abdun Nihaal Reviewed-by: Michael Nemanov Link: https://patch.msgid.link/20250330104532.44935-1-abdun.nihaal@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wl1251/tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c index e9dc3c72bb110..06dc74cc6cb52 100644 --- a/drivers/net/wireless/ti/wl1251/tx.c +++ b/drivers/net/wireless/ti/wl1251/tx.c @@ -342,8 +342,10 @@ void wl1251_tx_work(struct work_struct *work) while ((skb = skb_dequeue(&wl->tx_queue))) { if (!woken_up) { ret = wl1251_ps_elp_wakeup(wl); - if (ret < 0) + if (ret < 0) { + skb_queue_head(&wl->tx_queue, skb); goto out; + } woken_up = true; } -- 2.39.5