stop_timer_and_thread() is called from shutdown_smi() before the SMI
interface state and its private data are released. It currently uses
timer_delete_sync(), which waits for a running callback but does not
prevent a concurrent smi_mod_timer() from rearming si_timer after the
delete.
Use timer_shutdown_sync() so the timer cannot be rearmed after final
teardown begins.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: [email protected]
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <[email protected]>
---
drivers/char/ipmi/ipmi_si_intf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 9a9d12be9..6825cb02a 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1913,7 +1913,7 @@ static inline void stop_timer_and_thread(struct smi_info
*smi_info)
}
smi_info->timer_can_start = false;
- timer_delete_sync(&smi_info->si_timer);
+ timer_shutdown_sync(&smi_info->si_timer);
}
static struct smi_info *find_dup_si(struct smi_info *info)
--
2.34.1
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer