[PATCH] IPMI: fix handling of OEM flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
Cc: Matt Domsch <[email protected]>

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;
 	}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux