[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1401780809-12331-2-git-send-email-laijs@cn.fujitsu.com>
Date: Tue, 3 Jun 2014 15:33:28 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: <linux-kernel@...r.kernel.org>
CC: Tejun Heo <tj@...nel.org>, Lai Jiangshan <laijs@...fujitsu.com>,
"Jason J. Herne" <jjherne@...ux.vnet.ibm.com>,
Sasha Levin <sasha.levin@...cle.com>
Subject: [PATCH 2/2] workqueue: stronger test in process_one_work()
When POOL_DISASSOCIATED is cleared, the running worker's local CPU should
be the same as pool->cpu without any exception even during cpu-hotplug.
This fix changes "(proposition_A && proposition_B && proposition_C)"
to "(proposition_B && proposition_C)", so if the old compound proposition
is true, the new one must be true too. so this fix will not hide any
possible bug which can be hit by old test.
CC: Jason J. Herne <jjherne@...ux.vnet.ibm.com>
CC: Sasha Levin <sasha.levin@...cle.com>
Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
kernel/workqueue.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 5ae491e..204dd95 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2015,13 +2015,8 @@ __acquires(&pool->lock)
lockdep_copy_map(&lockdep_map, &work->lockdep_map);
#endif
- /*
- * Ensure we're on the correct CPU. DISASSOCIATED test is
- * necessary to avoid spurious warnings from rescuers servicing the
- * unbound or a disassociated pool.
- */
- WARN_ON_ONCE(!(worker->flags & WORKER_UNBOUND) &&
- !(pool->flags & POOL_DISASSOCIATED) &&
+ /* Ensure we're on the correct CPU. */
+ WARN_ON_ONCE(!(pool->flags & POOL_DISASSOCIATED) &&
raw_smp_processor_id() != pool->cpu);
/*
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists