]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: remove unconditional looping in local task_work handling
authorJens Axboe <axboe@kernel.dk>
Wed, 31 Jan 2024 17:50:08 +0000 (10:50 -0700)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:17 +0000 (18:19 -0400)
commit7b8fa7a0c291cc110804316bcddb31edea72af39
tree2b60a7af1258d1964b035c1cbab188e717ef85f6
parent8c0a0ae8afc8cde2388f8702537c7db59cc9a245
io_uring: remove unconditional looping in local task_work handling

[ Upstream commit 9fe3eaea4a3530ca34a8d8ff00b1848c528789ca ]

If we have a ton of notifications coming in, we can be looping in here
for a long time. This can be problematic for various reasons, mostly
because we can starve userspace. If the application is waiting on N
events, then only re-run if we need more events.

Fixes: c0e0d6ba25f1 ("io_uring: add IORING_SETUP_DEFER_TASKRUN")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/io_uring.c