From patchwork Fri Jun 12 07:59:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nichole Wang X-Patchwork-Id: 1308038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 49jtTY24dVz9sSy for ; Fri, 12 Jun 2020 18:01:21 +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 49jtTX6fcKzDqyw for ; Fri, 12 Jun 2020 18:01:20 +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=segapp01.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 segapp01.wistron.com (segapp02.wistron.com [103.200.3.19]) by lists.ozlabs.org (Postfix) with ESMTP id 49jtS5096vzDqys for ; Fri, 12 Jun 2020 17:59:54 +1000 (AEST) Received: from EXCHAPP03.whq.wistron (unverified [10.37.38.26]) by TWNHUMSW5.wistron.com (Clearswift SMTPRS 5.6.0) with ESMTP id ; Fri, 12 Jun 2020 15:59:47 +0800 Received: from EXCHAPP03.whq.wistron (10.37.38.26) by EXCHAPP03.whq.wistron (10.37.38.26) 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 15:59:45 +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 15:59:45 +0800 From: nichole To: , Stewart Smith Date: Fri, 12 Jun 2020 15:59:43 +0800 Message-ID: <20200612075943.29540-1-Nichole_Wang@wistron.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-TM-SNTS-SMTP: 54894E92F5B50AFFF51C28C5556B882DDB0AE5F71A1DE7BDCC6331760AE482E32000: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: Oliver OHalloran , 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)