mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
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: 62cd145453 ("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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user