Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dcf5a80 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull workqueue fix from Tejun Heo:
 "The optimization for setting unbound worker affinity masks collided
  with recent scheduler changes triggering warning messages.

  This late pull request fixes the bug by removing the optimization"

* 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: Fix setting affinity of unbound worker threads
parents 3e0a3965 d945b5e9
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -4600,15 +4600,11 @@ static void restore_unbound_workers_cpumask(struct worker_pool *pool, int cpu)
	if (!cpumask_test_cpu(cpu, pool->attrs->cpumask))
	if (!cpumask_test_cpu(cpu, pool->attrs->cpumask))
		return;
		return;


	/* is @cpu the only online CPU? */
	cpumask_and(&cpumask, pool->attrs->cpumask, cpu_online_mask);
	cpumask_and(&cpumask, pool->attrs->cpumask, cpu_online_mask);
	if (cpumask_weight(&cpumask) != 1)
		return;


	/* as we're called from CPU_ONLINE, the following shouldn't fail */
	/* as we're called from CPU_ONLINE, the following shouldn't fail */
	for_each_pool_worker(worker, pool)
	for_each_pool_worker(worker, pool)
		WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task,
		WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, &cpumask) < 0);
						  pool->attrs->cpumask) < 0);
}
}


/*
/*