]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: fix max_active handling in init_and_link_pwq()
authorTejun Heo <tj@kernel.org>
Wed, 13 Mar 2013 23:51:35 +0000 (16:51 -0700)
committerTejun Heo <tj@kernel.org>
Wed, 13 Mar 2013 23:51:35 +0000 (16:51 -0700)
commitb36391721cd0c286e14a855fd7c4adbf0053c383
tree24d945cc7c5476220f5d7c3a1fefddbc2f056373
parent1f1bafdbb9ec69783eda9ff2e878b02316a3c34a
workqueue: fix max_active handling in init_and_link_pwq()

Since 2bc99a1a1c ("workqueue: implement apply_workqueue_attrs()"),
init_and_link_pwq() may be called to initialize a new pool_workqueue
for a workqueue which is already online, but the function was setting
pwq->max_active to wq->saved_max_active without proper
synchronization.

Fix it by calling pwq_adjust_max_active() under proper locking instead
of manually setting max_active.

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c