Skip to contentSkip to conversation

IPMI: fix handling of OEM flags

PATCH In review Corey Minyard 2 participants 2 messages Sep 13, 2006 IPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPMI: fix handling of OEM flags

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.

drivers/char/ipmi/ipmi_si_intf.c +4 -4
Index: 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;
 	}
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Corey Minyard

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.

Signature · 4 lines
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com