aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-14 19:14:29 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-14 19:14:29 -0700
commitce8356335027d3929fbfae4127451adaf36e1cd4 (patch)
tree8ac7d71d3b67a6138e811cd4d4e135d934233e47 /net/core/filter.c
parentInput: mt6779-keypad - fix signedness bug (diff)
parentLinux 5.17-rc8 (diff)
downloadlinux-dev-ce8356335027d3929fbfae4127451adaf36e1cd4.tar.xz
linux-dev-ce8356335027d3929fbfae4127451adaf36e1cd4.zip
Merge tag 'v5.17-rc8' into next
Sync up with mainline to again get the latest changes in HID subsystem.
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 4603b7cd3cd1..9eb785842258 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2710,6 +2710,9 @@ BPF_CALL_4(bpf_msg_push_data, struct sk_msg *, msg, u32, start,
if (unlikely(flags))
return -EINVAL;
+ if (unlikely(len == 0))
+ return 0;
+
/* First find the starting scatterlist element */
i = msg->sg.start;
do {