Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull workqueue fix from Tejun Heo:
"This contains one fix which could lead to system-wide lockup on
!PREEMPT kernels. It's very late in the cycle but this definitely is
a -stable material.

The problem is that workqueue worker tasks may process unlimited
number of work items back-to-back without every yielding inbetween.
This usually isn't noticeable but a work item which re-queues itself
waiting for someone else to do something can deadlock with
stop_machine. stop_machine will ensure nothing else happens on all
other cpus and the requeueing work item will reqeueue itself
indefinitely without ever yielding and thus preventing the CPU from
entering stop_machine.

Kudos to Jamie Liu for spotting and diagnosing the problem. This can
be trivially fixed by adding cond_resched() after processing each work
item"

* 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: cond_resched() after processing each work item

+9
+9
kernel/workqueue.c
··· 2201 2201 dump_stack(); 2202 2202 } 2203 2203 2204 + /* 2205 + * The following prevents a kworker from hogging CPU on !PREEMPT 2206 + * kernels, where a requeueing work item waiting for something to 2207 + * happen could deadlock with stop_machine as such work item could 2208 + * indefinitely requeue itself while all other CPUs are trapped in 2209 + * stop_machine. 2210 + */ 2211 + cond_resched(); 2212 + 2204 2213 spin_lock_irq(&pool->lock); 2205 2214 2206 2215 /* clear cpu intensive status */