Skip to content

Commit ba60140

Browse files
cminyardgregkh
authored andcommitted
ipmi:si: Return state to normal if message allocation fails
commit 09dd798 upstream. There were places where nothing would get started if a message allocation failed, so the driver needs to return to normal state. Fixes: 1da177e ("Linux-2.6.12-rc2") Cc: <stable@vger.kernel.org> Signed-off-by: Corey Minyard <corey@minyard.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2426926 commit ba60140

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,19 @@ static void handle_flags(struct smi_info *smi_info)
497497
} else if (smi_info->msg_flags & RECEIVE_MSG_AVAIL) {
498498
/* Messages available. */
499499
smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
500-
if (!smi_info->curr_msg)
500+
if (!smi_info->curr_msg) {
501+
smi_info->si_state = SI_NORMAL;
501502
return;
503+
}
502504

503505
start_getting_msg_queue(smi_info);
504506
} else if (smi_info->msg_flags & EVENT_MSG_BUFFER_FULL) {
505507
/* Events available. */
506508
smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
507-
if (!smi_info->curr_msg)
509+
if (!smi_info->curr_msg) {
510+
smi_info->si_state = SI_NORMAL;
508511
return;
512+
}
509513

510514
start_getting_events(smi_info);
511515
} else if (smi_info->msg_flags & OEM_DATA_AVAIL &&

0 commit comments

Comments
 (0)