summaryrefslogtreecommitdiffstats
path: root/net/xdp/xsk.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 02:18:06 +0000
commitdbbf0dcdfc9a5d90d5146bb195fce97064d92c76 (patch)
treebab1434b47a284ca2893dcc0b908d1b95d982e7c /net/xdp/xsk.c
parentAdding upstream version 6.1.85. (diff)
downloadlinux-dbbf0dcdfc9a5d90d5146bb195fce97064d92c76.tar.xz
linux-dbbf0dcdfc9a5d90d5146bb195fce97064d92c76.zip
Adding upstream version 6.1.90.upstream/6.1.90upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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;