Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Pavel Begunkov and committed by
Jens Axboe
52a05d0c 4e9fda29

-2
-2
io_uring/kbuf.c
··· 509 509 return -EOVERFLOW; 510 510 if (check_add_overflow((unsigned long)p->addr, size, &tmp_check)) 511 511 return -EOVERFLOW; 512 - 513 - size = (unsigned long)p->len * p->nbufs; 514 512 if (!access_ok(u64_to_user_ptr(p->addr), size)) 515 513 return -EFAULT; 516 514