diff options
| author | Corey Minyard <corey@minyard.net> | 2025-03-21 15:15:05 -0500 |
|---|---|---|
| committer | Corey Minyard <corey@minyard.net> | 2025-05-07 17:25:48 -0500 |
| commit | f2a31163d6a32143f9e97418fbb30b398c1ebeb7 (patch) | |
| tree | 66d09a49a1709525a0d10aee64ab29d10edaf5c5 | |
| parent | ff2d2bc9f29d26f5eff9b8fdde225fd705f5555f (diff) | |
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>
| -rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 6c9773b3c857..6a680c559ed1 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -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) { |
