mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [GIT PULL] workqueue fixes for v4.6-rc7
Date: Fri, 13 May 2016 17:18:10 -0400	[thread overview]
Message-ID: <20160513211810.GP7110@mtj.duckdns.org> (raw)

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) {

                 reply	other threads:[~2016-05-13 21:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160513211810.GP7110@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®