io_uring/kbuf: don't compute size twice on prep
The size in prep is calculated by io_provide_buffers_prep(), so remove the recomputation a few lines after. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/7c97206561b74fce245cb22449c6082d2e066844.1747150490.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>pull/1250/head
parent
4e9fda29d6
commit
52a05d0cf8
|
|
@ -509,8 +509,6 @@ int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe
|
|||
return -EOVERFLOW;
|
||||
if (check_add_overflow((unsigned long)p->addr, size, &tmp_check))
|
||||
return -EOVERFLOW;
|
||||
|
||||
size = (unsigned long)p->len * p->nbufs;
|
||||
if (!access_ok(u64_to_user_ptr(p->addr), size))
|
||||
return -EFAULT;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue