Commit 44a84da4 authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Jens Axboe

io_uring: use call_rcu_hurry if signaling an eventfd

io_uring uses call_rcu in the case it needs to signal an eventfd as a
result of an eventfd signal, since recursing eventfd signals are not
allowed. This should be calling the new call_rcu_hurry API to not delay
the signal.
Signed-off-by: default avatarDylan Yudaken <dylany@meta.com>

Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
Cc: Paul E. McKenney <paulmck@kernel.org>
Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Reviewed-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
Link: https://lore.kernel.org/r/20221215184138.795576-1-dylany@meta.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a8cf95f9
...@@ -538,7 +538,7 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx) ...@@ -538,7 +538,7 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx)
} else { } else {
atomic_inc(&ev_fd->refs); atomic_inc(&ev_fd->refs);
if (!atomic_fetch_or(BIT(IO_EVENTFD_OP_SIGNAL_BIT), &ev_fd->ops)) if (!atomic_fetch_or(BIT(IO_EVENTFD_OP_SIGNAL_BIT), &ev_fd->ops))
call_rcu(&ev_fd->rcu, io_eventfd_ops); call_rcu_hurry(&ev_fd->rcu, io_eventfd_ops);
else else
atomic_dec(&ev_fd->refs); atomic_dec(&ev_fd->refs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment