]> git.baikalelectronics.ru Git - kernel.git/commit
irq/work: Use llist_for_each_entry_safe
authorThomas Gleixner <tglx@linutronix.de>
Sun, 12 Nov 2017 12:02:51 +0000 (13:02 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 12 Nov 2017 12:15:14 +0000 (13:15 +0100)
commit215089b85943b5794426d3475771066b2ada6b5b
treead39bb22f22d5613e7c40b5e39552c334192dd46
parenta907247e4fc5ffac2c22e1edb00e546ab5d752db
irq/work: Use llist_for_each_entry_safe

The llist_for_each_entry() loop in irq_work_run_list() is unsafe because
once the works PENDING bit is cleared it can be requeued on another CPU.

Use llist_for_each_entry_safe() instead.

Fixes: fda1b154ae89 ("irq/work: Don't reinvent the wheel but use existing llist API")
Reported-by:Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petri Latvala <petri.latvala@intel.com>
Link: http://lkml.kernel.org/r/151027307351.14762.4611888896020658384@mail.alporthouse.com
kernel/irq_work.c