Skip to content

Commit

Permalink
workqueue: check the allocation of system_unbound_wq
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Hitoshi Mitake authored and Tejun Heo committed Nov 26, 2010
1 parent 698fd6a commit e5cba24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit e5cba24

Please sign in to comment.