Skip to content

Commit 7fc3e25

Browse files
zhangjian3032cminyard
authored andcommitted
ipmi: ssif_bmc: cancel response timer on remove
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. Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com> Message-ID: <20260403090603.3988423-1-zhangjian.3032@bytedance.com> Signed-off-by: Corey Minyard <corey@minyard.net>
1 parent 122d16d commit 7fc3e25

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/char/ipmi/ssif_bmc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ static void ssif_bmc_remove(struct i2c_client *client)
843843
{
844844
struct ssif_bmc_ctx *ssif_bmc = i2c_get_clientdata(client);
845845

846+
timer_delete_sync(&ssif_bmc->response_timer);
846847
i2c_slave_unregister(client);
847848
misc_deregister(&ssif_bmc->miscdev);
848849
}

0 commit comments

Comments
 (0)