Article View: linux.kernel.netdev
Article #25334linux-next: manual merge of the net-next tree with the net tree
From: Mark Brown
Date: Tue, 01 Dec 2026 14:23
Date: Tue, 01 Dec 2026 14:23
117 lines
11564 bytes
11564 bytes
--YXDlHgnfK38Qb6hC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
net/core/skbuff.c
between commits:
c4c0e59c6b75b ("net: skbuff: limit folio refcount when rearranging skb fr=
ags")
ee5c8fcd02634 ("net: skbuff: limit folio refcount when copying skb frag r=
eferences")
=66rom the net tree and commits:
b242a00c2bc3b ("net: skbuff: make skb_try_coalesce()'s len unsigned")
86cc1a8a942b1 ("net: skbuff: let skb_zerocopy() copy a short skb without =
head_frag")
=66rom the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc net/core/skbuff.c
index 6c496e881b3df,4a47ee762cd0e..0000000000000
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@@ -3919,10 -4173,11 +4184,12 @@@ EXPORT_SYMBOL_GPL(skb_zerocopy_headlen)
*
* Return value:
* 0: everything is OK
- * -ENOMEM: couldn't orphan frags of @from due to lack of memory
+ * -ENOMEM: couldn't orphan frags of @from due to lack of memory, or
+ * couldn't take additional references to the frags of @from
- * -EFAULT: skb_copy_bits() found some problem with skb geometry, or read=
able head
- * payload would be mixed with unreadable frags.
+ * -EFAULT: skb_copy_bits() found some problem with skb geometry, @from h=
as
+ * no head_frag and @hlen is 0 while @len doesn't fit in @to's tailroom,
+ * or readable head payload would be mixed with unreadable frags.
+ * -EINVAL: @len or @hlen is negative
*/
int
skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
@@@ -6324,8 -6612,8 +6639,9 @@@ bool skb_try_coalesce(struct sk_buff *t
bool *fragstolen, int *delta_truesize)
{
struct skb_shared_info *to_shinfo, *from_shinfo;
- int delta, len =3D from->len;
+ unsigned int len =3D from->len;
- int i, delta;
+ bool cloned;
++ int delta;
=20
*fragstolen =3D false;
=20
@@@ -6396,17 -6674,20 +6702,29 @@@
delta =3D from->truesize - SKB_TRUESIZE(skb_end_offset(from));
}
=20
- WARN_ON_ONCE(delta < len);
+ /* @from claims more data than it has memory for. Leave @to alone. */
+ if (WARN_ON_ONCE(delta < 0 || delta < len))
+ return false;
+=20
+ if (skb_headlen(from) !=3D 0) {
+ struct page *page =3D virt_to_head_page(from->head);
+ unsigned int offset;
+=20
+ offset =3D from->data - (unsigned char *)page_address(page);
+ skb_fill_page_desc(to, to_shinfo->nr_frags,
+ page, offset, skb_headlen(from));
+ *fragstolen =3D true;
+ }
=20
+ /*
+ * A clone keeps referencing its frags, so we need our own references.
+ * Nothing was added to @to yet: we only steal the head of @from above
+ * if it is not locked, and the head of a clone is always locked.
+ */
+ cloned =3D skb_cloned(from);
+ if (cloned && !skb_frags_try_ref(from))
+ return false;
+
memcpy(to_shinfo->frags + to_shinfo->nr_frags,
from_shinfo->frags,
from_shinfo->nr_frags * sizeof(skb_frag_t));
--YXDlHgnfK38Qb6hC
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmsO2EYACgkQJNaLcl1U
h9CWFgf9G/aBoDxRvwF4aaoKQIHOFeazAwgi2tq7BrYZo/brUywRRCWcWJQtPOql
i2wppTLfr5/gJPKrrOwOUzw8aGUkzCfMVSRvCKdaoU8OrUfU4dKFUO82fKFgvoU/
tq8ocUBKA414t+NCiH3bERKxLgMpJD1gBpRh+Et1eXlazvDDZ132Q3piPXUG3egH
3GdRvfqVxRJkJXpZ+5/PrDjLQnlzeiLgw85cPQZxqyEniIqOQP3suQHo0pUrPjSE
vQ4M9JUpaczOp9/fmeT3c6rD4Eftejl4M5QSJses5AGKn2TOlkQ7q+Ln6BzIe0MF
rtzxvH0IEQCM+K44hKJHqg3ggvRHdw==
=QGmw
-----END PGP SIGNATURE-----
--YXDlHgnfK38Qb6hC--
Technical Details
Message-ID:
<aw7YRjd4dTVSQlih@sirena.org.uk>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375159-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375159-linux-kernel-netdev=dewy.ru From: broonie@kernel.org (Mark Brown) Newsgroups: linux.kernel.netdev Subject: linux-next: manual merge of the net-next tree with the net tree Date: Tue, 1 Dec 2026 14:23:02 +0000 Organization: Usenet Network Message-ID: <aw7YRjd4dTVSQlih@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YXDlHgnfK38Qb6hC" Injection-Info: usenet.network; logging-data="1734035"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:7hu1oCEDyRWMxXhik3Kb68G1Gso= sha256:nREpuklH2RwpJkNAto2pFjSQUD1H1bSq81/LA0kH6yI= sha1:zqjCW7mSPvSC8xxUvkrJL63VNN4= sha256:ccfk2D0vjEPR1LtUMRxPt6sZezRb1klc4Rf11lAVfoU= Content-Disposition: inline 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 7E3BC1173E4; Tue, 1 Dec 2026 17:23:36 +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 zOnBNsEnky_f; Tue, 1 Dec 2026 17:23:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-375159-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 370791173E0; Tue, 1 Dec 2026 17:23:25 +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 44A4E27FC3; Tue, 1 Dec 2026 14:23:14 +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=1796134993; b=UdGuMxXdV2nObf1Hf0EvIe0GH7mEQU7tVPvBn7HdfS7xKkdUbq1fqDHk+45EPoUSMZLr iaWtELZS0ARu++LJxloMfBQorN3tjhEz9E/Dm2kMz4MBJYynZUvbovVNYTa9/zAPbFD7+ 7yp5aF7TA+XIzh/O1CsqBYNiH80L6E51k7ieaFZ8qaB5ph8K5qYrUJ8AkiJD6LAHcv/YI KS8rO2/ygZpUFMwvcTdhdwabn/GBPQCnre9zL+ppT0V3dkI/o1TMyfN6j2vyFFc7Ac6ZK 2TYM4kx1GKcOqjK0/0gmyur3DQuuCeSnz1STJI7hxGjQ+AuRrc9+kal6xEgO9ye2ypA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796134993; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Disposition; bh=PPgCAfYGbcdeOx6wy6QnFlaydD2YYBsRGBhTZUURwBw=; b=OVCfkm12y2TP3Vh1Iri3oa6vZ3sfAY1YHmmBqePJWdUoqgJeCTXezLIudKXVDN15AiX/ C6uR7ckEtHKMje2kAYrt1RKL5KDKJeAsHpOT15nuqxoUPX+lfaul6aXrU2kB4zf6r3s8D 7e7XqNzc8ME3kVBwN4AlJmieEpY8sHtogVWuszmCmXdozpTa3FHdS9ZzPDEeHYxyOHKrl W7KAx9DBMiAOrmJ/RPejJ7bQb6Dfr+Fl3caqQVcvwKUPKPzE+H2O18jtuXYzKWbKhx1UE NrZtlwWom+Lkra5jXU3OqDXqnZjEzMHkoOxngKtJZgVB8dPyWUKD6FUvuasDF+1gwIw== 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=kl7hsjrU; 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 79461606A330; Tue, 1 Dec 2026 14:23:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kl7hsjrU 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=1796134987; b=oQvJbvo8bzawFSLwlCWgSPPEE9kj3Rx3YaGbsBCVfrbHJ4joJXc5YNnyhuFWCZH6/5M3 kO9bV4REWX9jKA3bbIHIhpcUWkHPLBV6KmwEI4/W99tsTtcyRKjTjk2JN88wJVZSoifoD DcB+rcP+cS13PG+Ro6+zdwH9KggSp3HN/koKC6J/aExTzBufD5la7n207TJRPktt/FIyO nx29JiFqoyOaxKJNgOK1LprsKqBq8AFti+L4TUD3/hwSGCuvNhNp4XxCErwpnAFGPqyG7 TSr5tntrGIFf3f11FLCUVjpx040LoMTWzIiBr/zs+RaJE68EpNiPQY9ylBIXZopOdng== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796134987; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: MIME-Version:Content-Type:Content-Disposition; bh=PPgCAfYGbcdeOx6wy6QnFlaydD2YYBsRGBhTZUURwBw=; b=QBOQki9sfteE6qa9/3nOv19ESwvWFpacWmhFXhQOyosarJz2p27mZQICEqAnhlB1nxqO Vq649KQIbMilGcQ9gevaNNHJ+Amk+svUV+DRnuu3mXYV+TFj/85L1RzDzYWoy7+CQ/gKr N4hrB57xHL9HHne4yf7x+nYQSHODdi6WHprr7f75m+ugI6mI7PM6kxZY+0yDZGbo3zIJo df0tP6BIEjAgKfcnhujzuyNW8l8NvGJ+kKRvmDG4CCNtnqSvh358AWImUzAcPAh07X2V+ 0yklpBrq69M0YcbmYRR1JVvuI8L02PHwHWw1rDlLYzpqcjunHkH/4xlahVbFxLh4E6A== 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=kl7hsjrU; 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 99AB6606A322; Tue, 1 Dec 2026 14:23:07 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 862A01F00898; Tue, 1 Dec 2026 14:23:05 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796134987; bh=PPgCAfYGbcdeOx6wy6QnFlaydD2YYBsRGBhTZUURwBw=; h=Date:From:To:Cc:Subject; b=kl7hsjrUKyUr1hTgvfQ57rR9mg3eb2vkVG8dZyMlYUaXA70tCcqEeIw98UXTd07nE XpZN94Ocz4tbX/cBC/7WDaDRk+eP+/dCNcl2dOy4FWQZ9jcFTkKpyI4n6gdOiUrjbW BR909TLyJ2FWpzGVL0qxHbirNCDAWe7avMzD01pTLcZt1aIRwQsMSdr+uodfMWdwyL k/Cf5XGPi3d4PYjH+LcjeEk+0CmY8jgUDG+kx8pwDt8n9+QardhrYx0gLY6ChaCvJo jjcNz98KJ7xw+ehf+i9fHLPwTCUjBeYfYOHQYVqR2QRiYFu8ejdd34jnVqPU0+j2uI L3oFIFgCIh3lw== X-Cc: David Hildenbrand <david@kernel.org>, Josef Bacik <josef@toxicpanda.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org>, Willem de Bruijn <willemb@google.com> 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 X-Received-Bytes: 11305