summaryrefslogtreecommitdiffstats
path: root/io_uring/kbuf.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-12-21 08:49:18 -0700
committerJens Axboe <axboe@kernel.dk>2023-12-21 08:49:18 -0700
commit0a535eddbe0dc1de4386046ab849f08aeb2f8faf (patch)
treec15ad68745ed65233477ea63047a778727ff54a0 /io_uring/kbuf.h
parent6e5e6d274956305f1fc0340522b38f5f5be74bdb (diff)
downloadlinux-stable-0a535eddbe0dc1de4386046ab849f08aeb2f8faf.tar.gz
linux-stable-0a535eddbe0dc1de4386046ab849f08aeb2f8faf.tar.bz2
linux-stable-0a535eddbe0dc1de4386046ab849f08aeb2f8faf.zip
io_uring/rw: ensure io->bytes_done is always initialized
If IOSQE_ASYNC is set and we fail importing an iovec for a readv or writev request, then we leave ->bytes_done uninitialized and hence the eventual failure CQE posted can potentially have a random res value rather than the expected -EINVAL. Setup ->bytes_done before potentially failing, so we have a consistent value if we fail the request early. Cc: stable@vger.kernel.org Reported-by: xingwei lee <xrivendell7@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/kbuf.h')
0 files changed, 0 insertions, 0 deletions