diff options
| author | Corey Minyard <corey@minyard.net> | 2026-08-18 12:49:52 -0500 |
|---|---|---|
| committer | Corey Minyard <corey@minyard.net> | 2026-08-19 06:25:45 -0500 |
| commit | ae84a2536577057e97f23f75a202e26d0e86cf01 (patch) | |
| tree | ea2a53ba8bacc478289bd73d1393d028ab19c31b | |
| parent | ed98f8e27a93dae225a99ac41ad48f967fd19842 (diff) | |
ipmi:msghandler: Cancel work cleanly on an error
If an error occurs during startup of an IPMI interface, it may have
scheduled work to run. The work needs to be canceled before the
interface can be freed.
Reported-by: Nilay Shroff <nilay@linux.ibm.com>
Closes: https://sourceforge.net/p/openipmi/mailman/message/59375605/
Fixes: 62cd145453d5 ("ipmi:msghandler: Handle error returns from the SMI sender")
Cc: stable@vger.kernel.org # 7.0
Tested-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Corey Minyard <corey@minyard.net>
| -rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 7634dff99f41..c73e9def59a6 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -3766,6 +3766,7 @@ int ipmi_add_smi(struct module *owner, list_del(&intf->link); mutex_unlock(&ipmi_interfaces_mutex); mutex_unlock(&smi_watchers_mutex); + cancel_work_sync(&intf->smi_work); kref_put(&intf->refcount, intf_free); return rv; |
