mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] IPMI: fix handling of OEM flags
@ 2006-09-13 18:50 Corey Minyard
  2006-09-13 19:09 ` Matt Domsch
  0 siblings, 1 reply; 2+ messages in thread
From: Corey Minyard @ 2006-09-13 18:50 UTC (permalink / raw)
  To: Andrew Morton, Linux Kernel; +Cc: Matt Domsch


If one of the OEM flags becomes set in the flags from the
hardware, the driver could hang if no OEM handler was set.
Fix the code to handle this.  This was tested by setting
the flags by hand after they were fetched.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>

Index: linux-2.6.17/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.17.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ linux-2.6.17/drivers/char/ipmi/ipmi_si_intf.c
@@ -403,10 +403,10 @@ static void handle_flags(struct smi_info
 			smi_info->curr_msg->data,
 			smi_info->curr_msg->data_size);
 		smi_info->si_state = SI_GETTING_EVENTS;
-	} else if (smi_info->msg_flags & OEM_DATA_AVAIL) {
-		if (smi_info->oem_data_avail_handler)
-			if (smi_info->oem_data_avail_handler(smi_info))
-				goto retry;
+	} else if (smi_info->msg_flags & OEM_DATA_AVAIL &&
+	           smi_info->oem_data_avail_handler) {
+		if (smi_info->oem_data_avail_handler(smi_info))
+			goto retry;
 	} else {
 		smi_info->si_state = SI_NORMAL;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-13 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 18:50 [PATCH] IPMI: fix handling of OEM flags Corey Minyard
2006-09-13 19:09 ` Matt Domsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®