[RAMEN9610-11757] irq/work: Use llist_for_each_entry_safe
authorThomas Gleixner <tglx@linutronix.de>
Sun, 12 Nov 2017 12:02:51 +0000 (13:02 +0100)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:15 +0000 (20:23 +0300)
commit4063e59eee2223b50524931b54c3867e055280a7
treef90cf8e7dc5cf7c44ccb1e9cf9556e29788a1180
parent1e2cb4e307c20f2a9c7a76956d62eb59902f18d2
[RAMEN9610-11757] 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.

Change-Id: I8680657f89c008f879b4e88e3499a7e44f2978a1
Fixes: 16c0890dc66d ("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