Re: [PATCH] watchdog: at91sam9_wdt: prevent timer rearm during teardown

Guenter Roeck <[email protected]>
Newsgroups org.kernel.vger.linux-watchdog,org.infradead.lists.linux-arm-kernel
Message-ID <[email protected]>
On Thu, Aug 06, 2026 at 02:06:13PM +0800, Hongyan Xu wrote:
> at91_ping() rearms the watchdog timer from its callback. timer_delete()
> neither waits for a running callback nor prevents it from rearming the
> timer, so probe failure or driver removal can leave the timer accessing the
> devm-allocated at91wdt after it has been freed.
> 
> Use timer_shutdown_sync() on both teardown paths. It waits for a running
> callback and rejects any attempt by the callback to rearm the timer.
> 
> Fixes: 5161b31dc39a ("watchdog: at91sam9_wdt: better watchdog support")
> Signed-off-by: Hongyan Xu <[email protected]>

Applied.

Thanks,
Guenter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.