From: Joonsoo Kim Date: Tue, 30 Apr 2013 15:07:00 +0000 (+0900) Subject: workqueue: correct handling of the pool spin_lock X-Git-Tag: upstream/snapshot3+hdmi~5078^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f174b1175a10903ade40f36eb6c896412877ca0;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git workqueue: correct handling of the pool spin_lock When we fail to mutex_trylock(), we release the pool spin_lock and do mutex_lock(). After that, we should regrab the pool spin_lock, but, regrabbing is missed in current code. So correct it. Cc: Lai Jiangshan Signed-off-by: Joonsoo Kim Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 1ae6028..286847b 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2059,6 +2059,7 @@ static bool manage_workers(struct worker *worker) if (unlikely(!mutex_trylock(&pool->manager_mutex))) { spin_unlock_irq(&pool->lock); mutex_lock(&pool->manager_mutex); + spin_lock_irq(&pool->lock); ret = true; }