From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 862A01F00898; Tue, 1 Dec 2026 14:23:05 +0000 (UTC) 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== Date: Tue, 1 Dec 2026 14:23:02 +0000 From: Mark Brown To: David Miller , Jakub Kicinski , Paolo Abeni , Networking Cc: David Hildenbrand , Josef Bacik , Linux Kernel Mailing List , Linux Next Mailing List , Willem de Bruijn Subject: linux-next: manual merge of the net-next tree with the net tree Message-ID: X-Mailing-List: linux-next@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YXDlHgnfK38Qb6hC" Content-Disposition: inline --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--