Skip to content

Commit 52c9ee2

Browse files
committed
ipmi:si: Handle waiting messages when BMC failure detected
If a BMC failure is detected, the current message is returned with an error. However, if there was a waiting message, it would not be handled. Add a check for the waiting message after handling the current message. Suggested-by: Guenter Roeck <linux@roeck-us.net> Reported-by: Rafael J. Wysocki <rafael@kernel.org> Closes: https://lore.kernel.org/linux-acpi/CAK8fFZ58fidGUCHi5WFX0uoTPzveUUDzT=k=AAm4yWo3bAuCFg@mail.gmail.com/ Fixes: bc3a9d2 ("ipmi:si: Gracefully handle if the BMC is non-functional") Cc: stable@vger.kernel.org # 4.18 Signed-off-by: Corey Minyard <corey@minyard.net>
1 parent 6b157b4 commit 52c9ee2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,12 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
809809
*/
810810
return_hosed_msg(smi_info, IPMI_BUS_ERR);
811811
}
812+
if (smi_info->waiting_msg != NULL) {
813+
/* Also handle if there was a message waiting. */
814+
smi_info->curr_msg = smi_info->waiting_msg;
815+
smi_info->waiting_msg = NULL;
816+
return_hosed_msg(smi_info, IPMI_BUS_ERR);
817+
}
812818
smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_HOSED);
813819
goto out;
814820
}

0 commit comments

Comments
 (0)