diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2013-06-07 16:03:56 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-08-13 16:09:02 -0400 |
commit | bf1251a885b8d6d729f314b635381210e23f51bf (patch) | |
tree | 68260732a7e741cbd40d2d8c1893bb1089853eae | |
parent | 825d23dbdc79d6139c4b869245c337b761986df8 (diff) |
kernel/workqueue: Add PF_THREAD_BOUND after set_cpu
This is just a precaution for now. There are reports that the flag is
getting lost. I could only notice this on workqueues due to another bug.
So this should WARN_ON should no trigger. If it does, investigations may
begin.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r-- | kernel/workqueue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 8817480d3204..99855b36a023 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1638,8 +1638,11 @@ __acquires(&gcwq->lock) * it races with cpu hotunplug operation. Verify * against GCWQ_DISASSOCIATED. */ - if (!(gcwq->flags & GCWQ_DISASSOCIATED)) + if (!(gcwq->flags & GCWQ_DISASSOCIATED)) { set_cpus_allowed_ptr(task, get_cpu_mask(gcwq->cpu)); + if (WARN_ON(!(task->flags & PF_THREAD_BOUND))) + task->flags |= PF_THREAD_BOUND; + } spin_lock_irq(&gcwq->lock); if (gcwq->flags & GCWQ_DISASSOCIATED) |