]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: add skb_header_pointer_careful() helper
authorEric Dumazet <edumazet@google.com>
Wed, 28 Jan 2026 14:15:38 +0000 (14:15 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Jan 2026 02:25:22 +0000 (18:25 -0800)
commit13e00fdc9236bd4d0bff4109d2983171fbcb74c4
tree740c70314fdd46f4a64588a659e958bcb238ab18
parent37d312bf957b95346fae2b3f82ce043474ea66c9
net: add skb_header_pointer_careful() helper

This variant of skb_header_pointer() should be used in contexts
where @offset argument is user-controlled and could be negative.

Negative offsets are supported, as long as the zone starts
between skb->head and skb->data.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260128141539.3404400-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/skbuff.h