Re: [PATCH v1] watchdog: unregister PM notifier on watchdog unregister
From: Guenter Roeck
Date: Mon Jun 08 2026 - 15:07:04 EST
On Mon, Jun 01, 2026 at 03:20:05PM -0400, Yuho Choi wrote:
> watchdog_register_device() registers wdd->pm_nb when
> WDOG_NO_PING_ON_SUSPEND is set, but watchdog_unregister_device() does not
> remove it. This leaves an embedded notifier block on the PM notifier chain
> after the watchdog device has been unregistered.
>
> A later suspend/resume notification can then call watchdog_pm_notifier()
> with a stale watchdog_device pointer, or at minimum after wdd->wd_data has
> been cleared by watchdog_dev_unregister().
>
> Unregister the PM notifier before tearing down the watchdog device.
>
> Fixes: 60bcd91aafd2 ("watchdog: introduce watchdog_dev_suspend/resume")
> Signed-off-by: Yuho Choi <dbgh9129@xxxxxxxxx>
Applied.
Thanks,
Guenter