Re: [PATCH v2] hwmon: (gpio-fan) return IRQ_HANDLED from the shared alarm IRQ handler
From: Guenter Roeck
Date: Mon Sep 14 2026 - 12:49:52 EST
On Mon, Sep 14, 2026 at 05:41:36PM +0700, Cong Nguyen wrote:
> fan_alarm_irq_handler() always schedules alarm_work but returns IRQ_NONE,
> so the kernel treats every alarm interrupt as unhandled. On a shared
> line that risks the whole line being disabled as spurious.
>
> v1 just fixed that, but it was still IRQF_SHARED, and always returning
> IRQ_HANDLED there defeats spurious-interrupt detection for the line --
> if the interrupt ever fires without a real event, nothing catches it,
> and a fault could spin the CPU in the handler.
>
> Sashiko flagged this in v1, and Guenter confirmed: this interrupt must
> not be shared. So v2 drops IRQF_SHARED too.
>
> Fixes: d6fe1360f42e ("hwmon: add generic GPIO fan driver")
> Reported-by: Sashiko AI review <sashiko-bot@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20260901160931.DD3811F00A3D@xxxxxxxxxxxxxxx
> Assisted-by: Claude:claude-opus-4
> Signed-off-by: Cong Nguyen <congnt264@xxxxxxxxx>
Applied.
Thanks,
Guenter