kernel: Warn when an IRQ's affinity notifier gets overwritten

An IRQ affinity notifier getting overwritten can point to some annoying
issues which need to be resolved, like multiple pm_qos objects being
registered to the same IRQ. Print out a warning when this happens to aid
debugging.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
fourteen
Sultan Alsawaf 4 years ago committed by Jenna
parent 59e9010741
commit eaf4e78745
  1. 2
      kernel/irq/manage.c

@ -330,6 +330,8 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
raw_spin_unlock_irqrestore(&desc->lock, flags);
if (old_notify) {
if (notify)
WARN(1, "overwriting previous IRQ affinity notifier\n");
if (cancel_work_sync(&old_notify->work)) {
/* Pending work had a ref, put that one too */
kref_put(&old_notify->kref, old_notify->release);

Loading…
Cancel
Save