mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] workqueue fixes for v4.6-rc7
@ 2016-05-13 21:18 Tejun Heo
  0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2016-05-13 21:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hello, Linus.

CPU hotplug callbacks can invoke DOWN_FAILED w/o preceding
DOWN_PREPARE which can trigger a WARN_ON() in workqueue.  The bug has
been there for a very long time.  It only triggers if CPU down fails
at a specific point and I don't think it has adverse effects other
than the warning messages.  The fix is very low impact.

Thanks.

The following changes since commit 346c09f80459a3ad97df1816d6d606169a51001a:

  workqueue: fix ghost PENDING flag while doing MQ IO (2016-04-26 11:23:22 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-4.6-fixes

for you to fetch changes up to f7c17d26f43d5cc1b7a6b896cd2fa24a079739b9:

  workqueue: fix rebind bound workers warning (2016-05-12 12:00:23 -0400)

----------------------------------------------------------------
Wanpeng Li (1):
      workqueue: fix rebind bound workers warning

 kernel/workqueue.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 801a698..1b2e36b 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4555,6 +4555,17 @@ static void rebind_workers(struct worker_pool *pool)
 						  pool->attrs->cpumask) < 0);
 
 	spin_lock_irq(&pool->lock);
+
+	/*
+	 * XXX: CPU hotplug notifiers are weird and can call DOWN_FAILED
+	 * w/o preceding DOWN_PREPARE.  Work around it.  CPU hotplug is
+	 * being reworked and this can go away in time.
+	 */
+	if (!(pool->flags & POOL_DISASSOCIATED)) {
+		spin_unlock_irq(&pool->lock);
+		return;
+	}
+
 	pool->flags &= ~POOL_DISASSOCIATED;
 
 	for_each_pool_worker(worker, pool) {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-13 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-13 21:18 [GIT PULL] workqueue fixes for v4.6-rc7 Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®