* [PATCH v3 1/1] io_uring: check for iowq alloc_workqueue failure
@ 2025-01-31 17:28 Pavel Begunkov
2025-01-31 23:56 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov @ 2025-01-31 17:28 UTC (permalink / raw)
To: io-uring; +Cc: asml.silence
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 <[email protected]>
---
v3: BUG_ON() since it seems nobody checks errors
v2: drop kmem_cache checking
io_uring/io_uring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 263e504be4a8b..dfebd949b8f37 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3920,6 +3920,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);
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 1/1] io_uring: check for iowq alloc_workqueue failure
2025-01-31 17:28 [PATCH v3 1/1] io_uring: check for iowq alloc_workqueue failure Pavel Begunkov
@ 2025-01-31 23:56 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2025-01-31 23:56 UTC (permalink / raw)
To: io-uring, Pavel Begunkov
On Fri, 31 Jan 2025 17:28:21 +0000, Pavel Begunkov wrote:
> alloc_workqueue() can fail even during init in io_uring_init(), check
> the result and panic if anything went wrong.
>
>
Applied, thanks!
[1/1] io_uring: check for iowq alloc_workqueue failure
commit: 74c726467895a435b89149204ba0c8b245ba9bb7
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-31 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-31 17:28 [PATCH v3 1/1] io_uring: check for iowq alloc_workqueue failure Pavel Begunkov
2025-01-31 23:56 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox