From ced65a053b90453a4e68b9bde7f4de00b68fef17 Mon Sep 17 00:00:00 2001 From: Dylan Yudaken Date: Thu, 15 Dec 2022 10:41:38 -0800 Subject: [PATCH] UPSTREAM: 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: Dylan Yudaken Cc: Joel Fernandes (Google) Cc: Paul E. McKenney Acked-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20221215184138.795576-1-dylany@meta.com Signed-off-by: Jens Axboe (cherry picked from commit 44a84da45272b3f4beb90025a64cfbde18f1aef0) Bug: 258241771 Signed-off-by: Joel Fernandes Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4909038 Reviewed-by: Vineeth Pillai Reviewed-by: Ross Zwisler Reviewed-by: Sean Paul Signed-off-by: Qais Yousef Change-Id: Iec189c9ce0a95ccacda81f58bf7d49a575a6ab3f --- io_uring/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index f413ebed81ab..24fb153158e6 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -536,7 +536,7 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx) } else { atomic_inc(&ev_fd->refs); 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 atomic_dec(&ev_fd->refs); }