diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2024-07-10 20:58:17 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-07-11 10:51:44 +0300 |
commit | 0453aad676ff99787124b9b3af4a5f59fbe808e2 (patch) | |
tree | 7e3717e964d83a91e7abb2d47295590663e31af9 /samples/vfio-mdev/mtty.c | |
parent | f7c696a56cc7d70515774a24057b473757ec6089 (diff) | |
download | linux-0453aad676ff99787124b9b3af4a5f59fbe808e2.tar.xz |
io_uring/io-wq: limit retrying worker initialisation
If io-wq worker creation fails, we retry it by queueing up a task_work.
tasK_work is needed because it should be done from the user process
context. The problem is that retries are not limited, and if queueing a
task_work is the reason for the failure, we might get into an infinite
loop.
It doesn't seem to happen now but it would with the following patch
executing task_work in the freezer's loop. For now, arbitrarily limit the
number of attempts to create a worker.
Cc: stable@vger.kernel.org
Fixes: 3146cba99aa28 ("io-wq: make worker creation resilient against signals")
Reported-by: Julian Orth <ju.orth@gmail.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/8280436925db88448c7c85c6656edee1a43029ea.1720634146.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'samples/vfio-mdev/mtty.c')
0 files changed, 0 insertions, 0 deletions