summaryrefslogtreecommitdiffstats
path: root/net/xdp/xsk.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:14 +0000
commit3a4516e9d4e52a1e1c49f9c269b6e702ef586047 (patch)
tree0e12fabd3a7d77e4d0bb956b670df8a1062abf7e /net/xdp/xsk.c
parentReleasing progress-linux version 6.1.85-1progress7u1. (diff)
downloadlinux-3a4516e9d4e52a1e1c49f9c269b6e702ef586047.tar.xz
linux-3a4516e9d4e52a1e1c49f9c269b6e702ef586047.zip
Merging upstream version 6.1.90.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/xdp/xsk.c')
-rw-r--r--net/xdp/xsk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 5c8e02d56..e3bdfc517 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -1127,6 +1127,8 @@ static int xsk_setsockopt(struct socket *sock, int level, int optname,
struct xsk_queue **q;
int entries;
+ if (optlen < sizeof(entries))
+ return -EINVAL;
if (copy_from_sockptr(&entries, optval, sizeof(entries)))
return -EFAULT;