diff options
| author | Breno Leitao <leitao@debian.org> | 2026-09-11 03:26:28 -0700 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-09-11 04:48:38 -1000 |
| commit | 9d4815c14f7faf789aeaa63515024168daf0390c (patch) | |
| tree | b1a722ddb5eeee08d4d64a5d2f147959c3405b88 /include/linux/workqueue.h | |
| parent | d8c2ce77cd09077ec57c4bed5678f76425157ccd (diff) | |
| download | linux-next-9d4815c14f7faf789aeaa63515024168daf0390c.tar.gz linux-next-9d4815c14f7faf789aeaa63515024168daf0390c.zip | |
workqueue: BUG_ON() a pwq release before workqueue_init()
put_pwq() bounces the release to pwq_release_worker to get out from
under pool->lock. workqueue_init() creates that kthread_worker well
after workqueue_init_early() has built the system workqueues, so a pwq
allocation failing partway through apply_wqattrs_prepare() unwinds
through apply_wqattrs_cleanup() and dereferences a NULL worker.
There is no way back from that. Running the release inline is not an
option, that is what the bounce exists for, and workqueue_init_early()
already BUG_ON()s a system workqueue it failed to allocate.
BUG_ON() the missing worker instead of oopsing inside
kthread_queue_work().
Suggested-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/all/144b3dc986135ebe34f671cdd02bd8aa@kernel.org/
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
