mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
io_uring: mark known and harmless racy ctx->int_flags uses
There are a few of these, where flags are read outside of the uring_lock, yet it's harmless to race on them. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -2242,7 +2242,7 @@ static __poll_t io_uring_poll(struct file *file, poll_table *wait)
|
||||
struct io_ring_ctx *ctx = file->private_data;
|
||||
__poll_t mask = 0;
|
||||
|
||||
if (unlikely(!(ctx->int_flags & IO_RING_F_POLL_ACTIVATED)))
|
||||
if (unlikely(!(data_race(ctx->int_flags) & IO_RING_F_POLL_ACTIVATED)))
|
||||
io_activate_pollwq(ctx);
|
||||
/*
|
||||
* provides mb() which pairs with barrier from wq_has_sleeper
|
||||
|
||||
Reference in New Issue
Block a user