From: Guenter Roeck Date: Wed, 12 Apr 2023 18:11:17 +0000 (-0700) Subject: hwmon: (pmbus/core) Request threaded interrupt with IRQF_ONESHOT X-Git-Tag: v6.4-rc1~151^2~15 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ab3e00416a0078be6d4126edc139536286d816e2;p=linux-block.git hwmon: (pmbus/core) Request threaded interrupt with IRQF_ONESHOT 0-day rightfully complains: drivers/hwmon/pmbus/pmbus_core.c:3164:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) Without IRQF_ONESHOT, the primary interrupt may end up in a loop, and the threaded interrupt handler may never execute. Request interrupt with IRQF_ONESHOT and assume that the interrupt will cleared and re-enabled by clearing the fault condition in the threaded interrupt handler. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-hwmon/6436efbb.08+e+yEDqvRxvHDP%25lkp@intel.com/T/#u Cc: Patrick Rudolph Cc: Naresh Solanki Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 86cc8001a788..bf561277c430 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -3246,8 +3246,8 @@ static int pmbus_irq_setup(struct i2c_client *client, struct pmbus_data *data) } /* Register notifiers */ - err = devm_request_threaded_irq(dev, client->irq, NULL, pmbus_fault_handler, 0, - "pmbus-irq", data); + err = devm_request_threaded_irq(dev, client->irq, NULL, pmbus_fault_handler, + IRQF_ONESHOT, "pmbus-irq", data); if (err) { dev_err(dev, "failed to request an irq %d\n", err); return err;