]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
watchdog: wdat_wdt: Stop watchdog when uninstalling module
authorLiu Xinpeng <liuxp11@chinatelecom.cn>
Tue, 26 Apr 2022 14:53:30 +0000 (22:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:30 +0000 (13:09 +0100)
[ Upstream commit 330415ebea81b65842e4cc6d2fd985c1b369e650 ]

Test shows that wachdog still reboots machine after the module
is removed. Use watchdog_stop_on_unregister to stop the watchdog
on removing.

Signed-off-by: Liu Xinpeng <liuxp11@chinatelecom.cn>
eviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1650984810-6247-4-git-send-email-liuxp11@chinatelecom.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Stable-dep-of: 25c0b472eab8 ("watchdog: wdat_wdt: Fix ACPI table leak in probe function")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/wdat_wdt.c

index 4fac8148a8e620c949070987560625ddb95c4c77..51cd99428940a22c2d8431340ee3b5747fa1fcdd 100644 (file)
@@ -463,6 +463,7 @@ static int wdat_wdt_probe(struct platform_device *pdev)
 
        watchdog_set_nowayout(&wdat->wdd, nowayout);
        watchdog_stop_on_reboot(&wdat->wdd);
+       watchdog_stop_on_unregister(&wdat->wdd);
        return devm_watchdog_register_device(dev, &wdat->wdd);
 }