summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-01-31 17:28:21 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:02 +0200
commit8e1844027c0ca4eacc7842cd786895598a740499 (patch)
treeaa5f2829414932e491910ccba8b5726fd42a1ddb /io_uring
parentf1d94b5d4286fc2d1cfd178e5d0de66e4629fac2 (diff)
downloadlinux-8e1844027c0ca4eacc7842cd786895598a740499.tar.gz
linux-8e1844027c0ca4eacc7842cd786895598a740499.tar.bz2
linux-8e1844027c0ca4eacc7842cd786895598a740499.zip
io_uring: check for iowq alloc_workqueue failure
[ Upstream commit 7215469659cb9751a9bf80e43b24a48749004d26 ] alloc_workqueue() can fail even during init in io_uring_init(), check the result and panic if anything went wrong. Fixes: 73eaa2b583493 ("io_uring: use private workqueue for exit work") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/3a046063902f888f66151f89fa42f84063b9727b.1738343083.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index f7acae5f7e1d..573b3f542b82 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3922,6 +3922,7 @@ static int __init io_uring_init(void)
SLAB_HWCACHE_ALIGN | SLAB_PANIC | SLAB_ACCOUNT);
iou_wq = alloc_workqueue("iou_exit", WQ_UNBOUND, 64);
+ BUG_ON(!iou_wq);
#ifdef CONFIG_SYSCTL
register_sysctl_init("kernel", kernel_io_uring_disabled_table);