projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'kbuild-fixes-v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-starfive.git]
/
io_uring
/
kbuf.c
diff --git
a/io_uring/kbuf.c
b/io_uring/kbuf.c
index
25cd724
..
e2c4688
100644
(file)
--- a/
io_uring/kbuf.c
+++ b/
io_uring/kbuf.c
@@
-346,6
+346,8
@@
int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe
tmp = READ_ONCE(sqe->off);
if (tmp > USHRT_MAX)
return -E2BIG;
tmp = READ_ONCE(sqe->off);
if (tmp > USHRT_MAX)
return -E2BIG;
+ if (tmp + p->nbufs >= USHRT_MAX)
+ return -EINVAL;
p->bid = tmp;
return 0;
}
p->bid = tmp;
return 0;
}