[Skiboot] [PATCH v2 1/8] IPMI: Fix corner case eSEL logging issue

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Sep 4 21:25:06 AEST 2015


eSEL logging fails, if eSEL event size is multiples of IPMI
buffer size.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
--
Stewart,
  Accidently I happened to log event with PEL log size = 0x2e6. Then
  I observed this bug.

-Vasant
---
 hw/ipmi/ipmi-sel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
index 343ca02..d711a1a 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -312,7 +312,7 @@ static void ipmi_elog_poll(struct ipmi_msg *msg)
 		return;
 	}
 
-	if ((esel_size - esel_index) < (IPMI_MAX_REQ_SIZE - ESEL_HDR_SIZE)) {
+	if ((esel_size - esel_index) <= (IPMI_MAX_REQ_SIZE - ESEL_HDR_SIZE)) {
 		/* Last data to send */
 		msg->data[6] = 1;
 		req_size = esel_size - esel_index + ESEL_HDR_SIZE;
-- 
2.1.0



More information about the Skiboot mailing list