🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8075

[PATCH net 0/5] eth: bnxt: fix Rx buffer leaks under OOM

#8075
From: Jakub Kicinski
Date: Tue, 27 Oct 2026 23:49
27 lines
8774 bytes
Commit bd3beb5c8691 ("eth: bnxt: disable rx-copybreak by default")
changed the defaults putting users on buggy(ier) driver paths.

Fix various ways bnxt may leak buffers under OOM. The first patch
fixes the real bug that was hit in production. Second patch fixes
an issue I hit while testing the first one. The next 3 patches
fix other Rx buffer leaks pointed out by an LLM during review.

I have a few more fixes for issues surfaced during review
(misplaced DMA syncs and bad event handling). I'll post those
separately.

Jakub Kicinski (5):
  eth: bnxt: recycle agg buffers when Rx head buffer allocation fails
  eth: bnxt: resize Rx head buffers when rx-copybreak changes
  eth: bnxt: don't leak buffers when XDP agg buffer allocation fails
  eth: bnxt: free XDP frags when xdp_do_redirect() fails
  eth: bnxt: hand XDP frags over to the copybreak skb

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 58 +++++++++++++------
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |  1 +
 3 files changed, 41 insertions(+), 19 deletions(-)

-- 
2.56.0
Technical Details
Message-ID: <20261027234940.1267225-1-kuba@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352665-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352665-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 0/5] eth: bnxt: fix Rx buffer leaks under OOM
Date: Tue, 27 Oct 2026 16:49:35 -0700
Organization: Usenet Network
Message-ID: <20261027234940.1267225-1-kuba@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1661656"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:VKzZ1o5/dwp5sYTVd4c0gwUPxa4= sha256:ynE9gP/UGC+mP9ndNzyo2mS/DQF8sBXEcufC6DKlMCQ=
	sha1:DwgUFm7lyUEGex+EMeSDc6iTQVM= sha256:H43uv/2+nj51yQ4Ko2ilY7ngmKdY6o8hN8rQTymLLmg=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id A5298125C29; Wed, 28 Oct 2026 02:50:57 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LECyzVoJYPNg;
	Wed, 28 Oct 2026 02:50:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352665-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 2E64B125C1D; Wed, 28 Oct 2026 02:50:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id D90302BA68; Tue, 27 Oct 2026 23:49:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793144993;
	b=kbt6iqxGEqPh+q9drfJNTmOI6RrN18+EbCT10zg4U9NDTsvmFGqWT6Wv68tZceplqf+o
	 KupFBZZ8aHB/zXt0tmJj0JjtHrZqLBa6OJU6vdr0LlRu6slntmbS+/8MtRt2j5gWXz+Tr
	 /O0xu3GublRDUME8ph/0dOJ3GLbyfFsjk3muvrq6kPoe++pPcWIsLWDIgt/VUXrtlcWOC
	 5YJqwI0Hc40QFFv4pZ6IkBz802D7BRxPttPupktcQ8UwjWm3iPn2xBLJBzn/yVQZOSePs
	 hDEDRR99KnEGiXsLcf0KhFgnuq2C2O5WH2ufS8+pMug8EBqc2Z2Ppwglb6verx+Mvqw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793144993;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=5UfrvjmPQqfo+IBDkK9qNrzC/Bn49zrz+L3WmDPaiYE=;
	b=yMKr7fZJ7ZcQEKLr6ki2jms2LyuzMM+P1hXWtC2ILQN7yAOATpzSpoojgjXevDUjZicL
	 8A7z2Dn1of8oe85S/mPyJWawxJ8Sq2tlmBN+ShFF29i9D69WdxHr5Bx0/CZqqWgpFhXLf
	 tQ7hgLBGyJQJiEbpbS3lNnPMz94ZTuRiCYRuqQpoWqMhRBrnAkALAmtaRbALtFKkuHs20
	 g3nROUQ6T2Ih9UfeqFzBCTYIUqPhogyYyVdmSrYjDkcq+q/eE3VYjyqBGIMi/MEobTfBi
	 WH3L0Emv1NiO5Eq0H+Ge25B0GTkbG+oXvnvRxkxU+0xNfvB4eOg5xC0RZTv3+hDB8Qg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XTSgYPVs;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F5CE606A322;
	Tue, 27 Oct 2026 23:49:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XTSgYPVs
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793144987;
	b=EERfOPHmfFjK1Kfmi2QC7W2vak+gtoZvuWHCNYvZIhZevNEz8quxrbrg5oWWrMQd2XBF
	 eSg3dmQYeE4WiPf8hhJ/ybCmKiwuc6DXycH1/XO1mTzQKwfQBBXb6XH6hyflO51Hdnlg2
	 mRHD/GDaLiyH5x5zLd/FZPTuL58DWCLplKQVgGGIkBLLiyqTXj1lOpF4kKd+gW6vfLY2T
	 RYBml2cRegd6M1wQBf9nosWLCanQboEfu6QO9a1+p9EOQ1+zFKwzK4etRgpI7UkL7S1XV
	 azn230XnaaBqzokDwNe3jzFdvSgeutbv3viP67Wj/4Cs49WzKQftTElr60mfyHFIa6w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793144987;
	h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 MIME-Version:Content-Transfer-Encoding;
	bh=5UfrvjmPQqfo+IBDkK9qNrzC/Bn49zrz+L3WmDPaiYE=;
	b=nDakAojj6kmr0hhj12X/gXLeybB1Nmn5epkFS76fyFUk1zir438snRKDbMD2Swx/ik5X
	 FYM6BvDB+HPIJSWGcqGPRjoy3MXidsi70p6y1Gb+QA41PGDRrFNvAvQa6Al5dVbr6ISYe
	 oDlTkG4W1wTddryirpooXq/6cHS70wImRV/Ev2rxuLoSYRtt2+Dz38USVhZdD7bHqPJy3
	 cGEpkaq4dxutRQaQYf+X0ArbpSMLZtLpjRcxhwmyltBXE9RpeIG4NJhI2sdfQc/je0X3e
	 uMFTR7i44YPQ8Kg354K55B9g3fh15lzeotvmFB6u9r6N1LMnFEmkESlRcddm+LuyXuA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XTSgYPVs;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71EC5606A31A
	for <netdev@vger.kernel.org>; Tue, 27 Oct 2026 23:49:47 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 819DF1F01825;
	Tue, 27 Oct 2026 23:49:46 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793144987;
	bh=5UfrvjmPQqfo+IBDkK9qNrzC/Bn49zrz+L3WmDPaiYE=;
	h=From:To:Cc:Subject:Date;
	b=XTSgYPVsxihpb+0lZrgGRmf6bHIrt7CxNG1yuf16W/3N27v19BHZFIc12HKggmTI6
	 vw3FGrLqsXeG3w+cjoD6KCBU4ivMdmNeY1ZjyV6LdflG523FcPAXpS+B/5fRuBUeX4
	 pclxcO+0HPTYXzBfnUn2CZmFiKplcZ0/YuYbiNZ5kQZwGNyFWtn7PpwyM0nCnbE+8J
	 Dc7uJIOhq4+FOcYVJbSomb+Cv8A7flXDFKVQGYdgCTR6F2Zh8mHP26dssHC2X7IBO8
	 FuHyzTQ9gPqW7q64W4Dd6NFWk0isvfGM/At+EWoXHsPnRkb7pzFoLu3SCvu4KelTSh
	 P8rWMJ4QKIxPw==
X-Cc: netdev@vger.kernel.org,
	edumazet@google.com,
	pabeni@redhat.com,
	andrew+netdev@lunn.ch,
	horms@kernel.org,
	michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com,
	hawk@kernel.org,
	john.fastabend@gmail.com,
	sdf@fomichev.me,
	eddie.wai@broadcom.com,
	prashant@broadcom.com,
	huangjw@broadcom.com,
	gospo@broadcom.com,
	brett.creeley@amd.com,
	ap420073@gmail.com,
	joe@dama.to,
	Jakub Kicinski <kuba@kernel.org>
X-Mailer: git-send-email 2.56.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list