mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] ipmi: ssif_bmc: cancel response timer on remove
@ 2026-04-02 11:04 Jian Zhang
  2026-04-02 11:04 ` [PATCH 2/5] ipmi: ssif_bmc: fix missing check for copy_to_user() partial failure Jian Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Jian Zhang @ 2026-04-02 11:04 UTC (permalink / raw)
  To: Corey Minyard, Quan Nguyen, openipmi-developer, linux-kernel

The response timer can stay armed across device teardown. If it fires after
remove, the callback dereferences the SSIF context and the i2c client after
teardown has started.

Cancel the timer in remove so the callback cannot run after the device is
unregistered.

Fixes: dd2bc5cc9e25 ("ipmi: ssif_bmc: Add SSIF BMC driver")
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
---
 drivers/char/ipmi/ssif_bmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/ipmi/ssif_bmc.c b/drivers/char/ipmi/ssif_bmc.c
index 7a52e3ea49ed..348e29490945 100644
--- a/drivers/char/ipmi/ssif_bmc.c
+++ b/drivers/char/ipmi/ssif_bmc.c
@@ -843,6 +843,7 @@ static void ssif_bmc_remove(struct i2c_client *client)
 {
 	struct ssif_bmc_ctx *ssif_bmc = i2c_get_clientdata(client);
 
+	del_timer_sync(&ssif_bmc->response_timer);
 	i2c_slave_unregister(client);
 	misc_deregister(&ssif_bmc->miscdev);
 }
-- 
2.20.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-04-03  8:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-02 11:04 [PATCH 1/5] ipmi: ssif_bmc: cancel response timer on remove Jian Zhang
2026-04-02 11:04 ` [PATCH 2/5] ipmi: ssif_bmc: fix missing check for copy_to_user() partial failure Jian Zhang
2026-04-02 11:04 ` [PATCH 3/5] ipmi: ssif_bmc: fix message desynchronization after truncated response Jian Zhang
2026-04-03  7:22   ` Quan Nguyen
2026-04-03  8:12     ` Jian Zhang
2026-04-02 11:04 ` [PATCH 4/5] ipmi: ssif_bmc: change log level to dbg in irq callback Jian Zhang
2026-04-02 11:04 ` [PATCH 5/5] ipmi: ssif_bmc: add unit test for state machine Jian Zhang
2026-04-02 15:42 ` [Openipmi-developer] [PATCH 1/5] ipmi: ssif_bmc: cancel response timer on remove Corey Minyard
2026-04-03  7:23   ` Quan Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®