Skip to content
Commit d871198e authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()



Not everything requires locking in there, which is why the 'has_lock'
variable exists. But enough does that it's a bit unwieldy to manage.
Wrap the whole thing in a ->uring_lock trylock, and just return
with no output if we fail to grab it. The existing trylock() will
already have greatly diminished utility/output for the failure case.

This fixes an issue with reading the SQE fields, if the ring is being
actively resized at the same time.

Reported-by: default avatarJann Horn <jannh@google.com>
Fixes: 79cfe9e5 ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f446c631
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment