History

workqueue: Use lockdep to assert IRQs are disabled/enabled

Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled.

Frederic Weisbecker committed 9 years ago

Commit 8e8eb731 parent f71b74b1 file · +1 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−1
@@ -1376,7 +1376,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, · 1375 unmodified lines
13761376 * queued or lose PENDING. Grabbing PENDING and queueing should
13771377 * happen with IRQ disabled.
13781378 */
1379− WARN_ON_ONCE(!irqs_disabled());
1379+ lockdep_assert_irqs_disabled();
13801380
13811381 debug_work_activate(work);
13821382