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 5818D37BE8F; Mon, 9 Feb 2026 14:55:14 +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=1770648914; cv=none; b=p+kuUGrZYdtzWFGxKaBeJ4EL9PHfurwmkS7EJhGkbXmOuJ+ulc/tGlV+ugOPTI85lXwAdW75cBIN6zKYRiVcKQBxH11u7iIet4XaNgRPirGKZ/OcNfoS5TBvON9ndCBAgnv3aZmxMpVujH6J5xw4KeFqV9M3T7MJOfFrjPmn/0E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770648914; c=relaxed/simple; bh=Sg/4zUlFXfErsBAYaVGtktAjStThtN5JUt/tdpExeZY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D+9UcoRwqu1/50JnxdVRIEOwivrF8A500kMMMrlp1rn51NE+efhsR02y48dUdyE2Lt3piazwchT2HCTlFiRyY51ydApjMrAU18zycx8A9RlJrtuLBnKPvdAuzhJpr6ewZoIXBSYraSorzoHjYf1KzGOJA5s75GueN8Pi9yf0/bk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=saiG3AQw; 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="saiG3AQw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BA86C116C6; Mon, 9 Feb 2026 14:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770648914; bh=Sg/4zUlFXfErsBAYaVGtktAjStThtN5JUt/tdpExeZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=saiG3AQwQI8agO8Jft7rucoupdK7ahgz7GPPCPf/fqkugMhiOC7QzDIKucxmH/frK kP4m20POOfXsHhJVe/fm/ypZ1kGwd7ZufeNoRwlZow6GS7ccHepmYegjEWWxhzmXOb H4K+hb0fI7bYZGDAnnywBm7y1Ust822TOw+5n0TM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peter Astrand , Johannes Berg , Sasha Levin Subject: [PATCH 5.15 25/75] wifi: wlcore: ensure skb headroom before skb_push Date: Mon, 9 Feb 2026 15:24:22 +0100 Message-ID: <20260209142302.752721454@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260209142301.830618238@linuxfoundation.org> References: <20260209142301.830618238@linuxfoundation.org> User-Agent: quilt/0.69 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Åstrand [ Upstream commit e75665dd096819b1184087ba5718bd93beafff51 ] This avoids occasional skb_under_panic Oops from wl1271_tx_work. In this case, headroom is less than needed (typically 110 - 94 = 16 bytes). Signed-off-by: Peter Astrand Link: https://patch.msgid.link/097bd417-e1d7-acd4-be05-47b199075013@lysator.liu.se Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wlcore/tx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index e20e18cd04aed..e86cc3425e997 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -210,6 +210,11 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif, total_blocks = wlcore_hw_calc_tx_blocks(wl, total_len, spare_blocks); if (total_blocks <= wl->tx_blocks_available) { + if (skb_headroom(skb) < (total_len - skb->len) && + pskb_expand_head(skb, (total_len - skb->len), 0, GFP_ATOMIC)) { + wl1271_free_tx_id(wl, id); + return -EAGAIN; + } desc = skb_push(skb, total_len - skb->len); wlcore_hw_set_tx_desc_blocks(wl, desc, total_blocks, -- 2.51.0