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 <[email protected]> Signed-off-by: Joonsoo Kim <[email protected]> diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 154aa12..e02994f 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2058,6 +2058,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; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

