From patchwork Fri Jun 12 08:30:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nichole Wang X-Patchwork-Id: 1308044 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49jv7q5B33z9sSy for ; Fri, 12 Jun 2020 18:31:03 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=wistron.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49jv7q1nmLzDqx1 for ; Fri, 12 Jun 2020 18:31:03 +1000 (AEST) X-Original-To: skiboot-stable@lists.ozlabs.org Delivered-To: skiboot-stable@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=wistron.com (client-ip=103.200.3.19; helo=segapp03.wistron.com; envelope-from=nichole_wang@wistron.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=wistron.com Received: from segapp03.wistron.com (segapp02.wistron.com [103.200.3.19]) by lists.ozlabs.org (Postfix) with ESMTP id 49jv7l2QYTzDqCb for ; Fri, 12 Jun 2020 18:30:56 +1000 (AEST) Received: from EXCHAPP01.whq.wistron (unverified [10.37.38.24]) by TWNHUMSW4.wistron.com (Clearswift SMTPRS 5.6.0) with ESMTP id ; Fri, 12 Jun 2020 16:30:53 +0800 Received: from EXCHAPP03.whq.wistron (10.37.38.26) by EXCHAPP01.whq.wistron (10.37.38.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Fri, 12 Jun 2020 16:30:51 +0800 Received: from gitserver.wistron.com (10.37.38.233) by EXCHAPP03.whq.wistron (10.37.38.26) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Fri, 12 Jun 2020 16:30:51 +0800 From: nichole To: Date: Fri, 12 Jun 2020 16:30:47 +0800 Message-ID: <20200612083047.3895-1-Nichole_Wang@wistron.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-TM-SNTS-SMTP: 462E81278553A9A06DC9B99019627BBBE5368453DB1CE011B88EF7CBD914128A2000:8 Subject: [Skiboot-stable] [PATCH] platform/mihawk: Fix IPMI double-free X-BeenThere: skiboot-stable@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches, review, and discussion for stable releases of skiboot" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: joy_chu@wistron.com, skiboot-stable@lists.ozlabs.org Errors-To: skiboot-stable-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot-stable" 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 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 --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)