diff options
author | Jens Axboe <[email protected]> | 2023-12-21 08:49:18 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-12-21 08:49:18 -0700 |
commit | 0a535eddbe0dc1de4386046ab849f08aeb2f8faf (patch) | |
tree | c15ad68745ed65233477ea63047a778727ff54a0 /security/selinux/hooks.c | |
parent | 6e5e6d274956305f1fc0340522b38f5f5be74bdb (diff) |
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: [email protected]
Reported-by: xingwei lee <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions