History

Merge branch 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue fix from Tejun Heo: "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" * 'for-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: fix rebind bound workers warning

Linus Torvalds committed 10 years ago

Commit da922232 parents 65643e3 f7c17d21 file · +11 −0Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+11−0
@@ -4554,6 +4554,17 @@ static void rebind_workers(struct worker_pool *pool) · 4553 unmodified lines
45544554 pool->attrs->cpumask) < 0);
45554555
45564556 spin_lock_irq(&pool->lock);
4557+
4558+ /*
4559+ * XXX: CPU hotplug notifiers are weird and can call DOWN_FAILED
4560+ * w/o preceding DOWN_PREPARE. Work around it. CPU hotplug is
4561+ * being reworked and this can go away in time.
4562+ */
4563+ if (!(pool->flags & POOL_DISASSOCIATED)) {
4564+ spin_unlock_irq(&pool->lock);
4565+ return;
4566+ }
4567+
45574568 pool->flags &= ~POOL_DISASSOCIATED;
45584569
45594570 for_each_pool_worker(worker, pool) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t