]> git.ipfire.org Git - thirdparty/linux.git/commit
net: Preserve metadata on pskb_expand_head
authorJakub Sitnicki <jakub@cloudflare.com>
Wed, 5 Nov 2025 20:19:39 +0000 (21:19 +0100)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 10 Nov 2025 18:52:31 +0000 (10:52 -0800)
commit290fc0be09e2f6e08754782616bb7e67f8191fa1
tree4bfa1d8c8ffbc429d9b2f461b079f70c2786e6e5
parent8989d328dfe7c7a3b9f4b9f0ef60006d277f81cc
net: Preserve metadata on pskb_expand_head

pskb_expand_head() copies headroom, including skb metadata, into the newly
allocated head, but then clears the metadata. As a result, metadata is lost
when BPF helpers trigger an skb head reallocation.

Let the skb metadata remain in the newly created copy of head.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20251105-skb-meta-rx-path-v4-2-5ceb08a9b37b@cloudflare.com
net/core/skbuff.c