mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 23:48:56 -04:00
ipmi:msghandler: Don't check for shutdown when returning responses
The lower level interface shouldn't attempt to unregister if it has a callback in the pending queue. Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
@@ -3893,17 +3893,12 @@ static int handle_ipmb_get_msg_cmd(struct ipmi_smi *intf,
|
||||
dev_dbg(intf->si_dev, "Invalid command: %*ph\n",
|
||||
msg->data_size, msg->data);
|
||||
|
||||
mutex_lock(&ipmi_interfaces_mutex);
|
||||
if (!intf->in_shutdown) {
|
||||
smi_send(intf, intf->handlers, msg, 0);
|
||||
/*
|
||||
* We used the message, so return the value
|
||||
* that causes it to not be freed or
|
||||
* queued.
|
||||
*/
|
||||
rv = -1;
|
||||
}
|
||||
mutex_unlock(&ipmi_interfaces_mutex);
|
||||
smi_send(intf, intf->handlers, msg, 0);
|
||||
/*
|
||||
* We used the message, so return the value that
|
||||
* causes it to not be freed or queued.
|
||||
*/
|
||||
rv = -1;
|
||||
} else {
|
||||
recv_msg = ipmi_alloc_recv_msg();
|
||||
if (!recv_msg) {
|
||||
@@ -3984,17 +3979,12 @@ static int handle_ipmb_direct_rcv_cmd(struct ipmi_smi *intf,
|
||||
msg->data[4] = IPMI_INVALID_CMD_COMPLETION_CODE;
|
||||
msg->data_size = 5;
|
||||
|
||||
mutex_lock(&ipmi_interfaces_mutex);
|
||||
if (!intf->in_shutdown) {
|
||||
smi_send(intf, intf->handlers, msg, 0);
|
||||
/*
|
||||
* We used the message, so return the value
|
||||
* that causes it to not be freed or
|
||||
* queued.
|
||||
*/
|
||||
rv = -1;
|
||||
}
|
||||
mutex_unlock(&ipmi_interfaces_mutex);
|
||||
smi_send(intf, intf->handlers, msg, 0);
|
||||
/*
|
||||
* We used the message, so return the value that
|
||||
* causes it to not be freed or queued.
|
||||
*/
|
||||
rv = -1;
|
||||
} else {
|
||||
recv_msg = ipmi_alloc_recv_msg();
|
||||
if (!recv_msg) {
|
||||
|
||||
Reference in New Issue
Block a user