summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2023-05-07 02:42:58 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-05-07 02:43:10 +0300
commit6e61c5fa4d43d4c3f780f74ba6b08dba80bd653a (patch)
tree9a5ef4b52333e03d5360e85b6d3aa34fa9747050 /include/linux
parente04ddf179c2acb6de841016e5bcf29b26705b4ec (diff)
parent798e48fc28fa64aa4eca6e8a404fa20ac8f7c09e (diff)
downloadlinux-6e61c5fa4d43d4c3f780f74ba6b08dba80bd653a.tar.xz
Merge branch 'Dynptr Verifier Adjustments'
Daniel Rosenberg says: ==================== These patches relax a few verifier requirements around dynptrs. Patches 1-3 are unchanged from v2, apart from rebasing Patch 4 is the same as in v1, see https://lore.kernel.org/bpf/CA+PiJmST4WUH061KaxJ4kRL=fqy3X6+Wgb2E2rrLT5OYjUzxfQ@mail.gmail.com/ Patch 5 adds a test for the change in Patch 4 ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 738776ab8838..8ddb4af1a501 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -4033,7 +4033,7 @@ __skb_header_pointer(const struct sk_buff *skb, int offset, int len,
if (likely(hlen - offset >= len))
return (void *)data + offset;
- if (!skb || unlikely(skb_copy_bits(skb, offset, buffer, len) < 0))
+ if (!skb || !buffer || unlikely(skb_copy_bits(skb, offset, buffer, len) < 0))
return NULL;
return buffer;