]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ipmi:si: Return state to normal if message allocation fails
authorCorey Minyard <corey@minyard.net>
Mon, 20 Apr 2026 18:02:18 +0000 (13:02 -0500)
committerCorey Minyard <corey@minyard.net>
Tue, 28 Apr 2026 17:59:15 +0000 (12:59 -0500)
There were places where nothing would get started if a message
allocation failed, so the driver needs to return to normal state.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: <stable@vger.kernel.org>
Signed-off-by: Corey Minyard <corey@minyard.net>
drivers/char/ipmi/ipmi_si_intf.c

index 7c3c463e08da255fa50e49dd9268343a00e2cede..9a9d12be9bf743d9484594a98c1d02c2a5e1f09b 100644 (file)
@@ -497,15 +497,19 @@ retry:
        } else if (smi_info->msg_flags & RECEIVE_MSG_AVAIL) {
                /* Messages available. */
                smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
-               if (!smi_info->curr_msg)
+               if (!smi_info->curr_msg) {
+                       smi_info->si_state = SI_NORMAL;
                        return;
+               }
 
                start_getting_msg_queue(smi_info);
        } else if (smi_info->msg_flags & EVENT_MSG_BUFFER_FULL) {
                /* Events available. */
                smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
-               if (!smi_info->curr_msg)
+               if (!smi_info->curr_msg) {
+                       smi_info->si_state = SI_NORMAL;
                        return;
+               }
 
                start_getting_events(smi_info);
        } else if (smi_info->msg_flags & OEM_DATA_AVAIL &&