diff options
author | Dylan Yudaken <dylany@fb.com> | 2022-04-21 11:13:44 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-25 02:18:18 +0200 |
commit | 155bc9505dbd6613585abbf0be6466f1c21536c4 (patch) | |
tree | 83ed320d4eb291088416417c25da076b249681e5 /fs/xattr.c | |
parent | io_uring: use constants for cq_overflow bitfield (diff) | |
download | linux-155bc9505dbd6613585abbf0be6466f1c21536c4.tar.xz linux-155bc9505dbd6613585abbf0be6466f1c21536c4.zip |
io_uring: return an error when cqe is dropped
Right now io_uring will not actively inform userspace if a CQE is
dropped. This is extremely rare, requiring a CQ ring overflow, as well as
a GFP_ATOMIC kmalloc failure. However the consequences could cause for
example applications to go into an undefined state, possibly waiting for a
CQE that never arrives.
Return an error code (EBADR) in these cases. Since this is expected to be
incredibly rare, try and avoid as much as possible affecting the hot code
paths, and so it only is returned lazily and when there is no other
available CQEs.
Once the error is returned, reset the error condition assuming the user is
either ok with it or will clean up appropriately.
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220421091345.2115755-6-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/xattr.c')
0 files changed, 0 insertions, 0 deletions