Skip to contentSkip to conversation

workqueue: check the allocation of system_unbound_wq

PATCH Applied Hitoshi Mitake 2 participants 3 messages Nov 26, 2010 – Nov 29, 2010 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 workqueue: check the allocation of system_unbound_wq

I found a trivial bug on initialization of workqueue. Current init_workqueues doesn't check the result of allocation of system_unbound_wq, this should be checked like other queues.

Cc Arjan van de Ven <[email protected]>
Cc David Howells <[email protected]>
---
 kernel/workqueue.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/workqueue.c +2 -1
index 90db1bd..b60374d 100644
@@ -3692,7 +3692,8 @@ static int __init init_workqueues(void)
 	system_nrt_wq = alloc_workqueue("events_nrt", WQ_NON_REENTRANT, 0);
 	system_unbound_wq = alloc_workqueue("events_unbound", WQ_UNBOUND,
 					    WQ_UNBOUND_MAX_ACTIVE);
-	BUG_ON(!system_wq || !system_long_wq || !system_nrt_wq);
+	BUG_ON(!system_wq || !system_long_wq ||
+		!system_nrt_wq || !system_unbound_wq);
 	return 0;
 }
 early_initcall(init_workqueues);
Signature · 1 line
1.6.5.2
maintainer Applied
#1 lore raw

Hello,

Quoted 8 lines · Hitoshi Mitake

I found a trivial bug on initialization of workqueue. Current init_workqueues doesn't check the result of allocation of system_unbound_wq, this should be checked like other queues.

Cc Arjan van de Ven <[email protected]>
Cc David Howells <[email protected]>

Queued to wq#for-linus with new line adjustment.

Thanks a lot. :-)

Signature · 1 line
tejun
#2 lore raw
Quoted 8 lines · Tejun Heo

Hello,

Quoted 5 lines · Hitoshi Mitake

I found a trivial bug on initialization of workqueue. Current init_workqueues doesn't check the result of allocation of system_unbound_wq, this should be checked like other queues.

Quoted 8 lines
Quoted 3 lines
Cc Arjan van de Ven<[email protected]>
Cc David Howells<[email protected]>

Queued to wq#for-linus with new line adjustment.

Thanks a lot. :-)

Hi Tejun,
Thanks for your adjustment and applying :)