diff mbox series

platform/mihawk: Fix IPMI double-free

Message ID 20200612075943.29540-1-Nichole_Wang@wistron.com
State Superseded
Headers show
Series platform/mihawk: Fix IPMI double-free | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (fe70fbb78d33abea788a3221bc409a7c50c019c3)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Nichole Wang June 12, 2020, 7:59 a.m. UTC
The commit 6826095 ("platform/mihawk: support dynamic PCIe slot table")
added the IPMI OEM command to communicate with BMC. We do the
ipmi_free_msg(msg) twice that caused the Fast-reboot fail.

This patch fixes it by removing the IPMI double-free bug to restore
Fast-reboot.

Signed-off-by: nichole <Nichole_Wang@wistron.com>
Cc: skiboot-stable@lists.ozlabs.org # skiboot-6.6.x
Cc: skiboot-stable@lists.ozlabs.org # skiboot-op940.x
Fixes: commit 6826095 ("platform/mihawk: support dynamic PCIe slot table")
---
 platforms/astbmc/mihawk.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/platforms/astbmc/mihawk.c b/platforms/astbmc/mihawk.c
index f3669ff..0d5279f 100644
--- a/platforms/astbmc/mihawk.c
+++ b/platforms/astbmc/mihawk.c
@@ -484,7 +484,6 @@  static void mihawk_riser_query_complete(struct ipmi_msg *msg)
 		prlog(PR_ERR, "Mihawk: IPMI riser query returned error. cmd=0x%02x,"
 			" netfn=0x%02x, rc=0x%x\n", msg->cmd, msg->netfn, msg->cc);
 		bmc_query_waiting = false;
-		ipmi_free_msg(msg);
 		return;
 	}
 
@@ -496,7 +495,6 @@  static void mihawk_riser_query_complete(struct ipmi_msg *msg)
 	*riser_state = msg->data[0] << 4 | msg->data[1];
 
 	bmc_query_waiting = false;
-	ipmi_free_msg(msg);
 }
 
 static void mihawk_init(void)