Skip to content
Commit c7b178da authored by Curtis Klein's avatar Curtis Klein Committed by Wim Van Sebroeck
Browse files

watchdog: Fix NULL pointer dereference when releasing cdev

watchdog_hrtimer_pretimeout_stop needs the watchdog device to have a
valid pointer to the watchdog core data to stop the pretimeout hrtimer.
Therefore it needs to be called before the pointers are cleared in
watchdog_cdev_unregister.

Fixes: 7b7d2fdc

 ("watchdog: Add hrtimer-based pretimeout feature")
Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarCurtis Klein <curtis.klein@hpe.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1624429583-5720-1-git-send-email-curtis.klein@hpe.com
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent cf6ea954
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment