From patchwork Tue May 26 18:54:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 225330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD82EC433DF for ; Tue, 26 May 2020 19:16:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F3C02053B for ; Tue, 26 May 2020 19:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590520573; bh=UM7I3L47W25YMxxLcbxVxwSxQCi28EC5cb/SVt9U61I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=w5xtjCsX+qYx+Z3N/AwmieB6XjtsK9xDCEZoadL8DIxEdKIR+4dd+wPD5F8+Xvtyj Ril6bLbU8vBd69M/VibB6F9J14OsAmaZ+YcmMRbP/ZnstEtOjXfEKcSkdhsMAGDOTD TiIaHCo07Yeuz49LfkuZUs8Q0OTbfKyYGCE3zZKo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392273AbgEZTQN (ORCPT ); Tue, 26 May 2020 15:16:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391809AbgEZTQM (ORCPT ); Tue, 26 May 2020 15:16:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E96C2053B; Tue, 26 May 2020 19:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590520571; bh=UM7I3L47W25YMxxLcbxVxwSxQCi28EC5cb/SVt9U61I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hO2nhI3J+Tq3cjkCU/RGjDW5rm+LIK43WOdgve4M47G8ZDU1ImS4e2bM7VX7boOZh Q5zbHzvJRP7W6jJ72DN7EGHK6j8+D2MJl0PfsCbpvHbXWsqaqYMzXV2FxIkT/UPXG3 M1kZ3lQnzjTgUdVq6zp7p7er5oTSgc54xA+QbvNI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lianbo Jiang , Philipp Rudo , Christian Borntraeger , Vasily Gorbik Subject: [PATCH 5.6 118/126] s390/kexec_file: fix initrd location for kdump kernel Date: Tue, 26 May 2020 20:54:15 +0200 Message-Id: <20200526183947.339223846@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200526183937.471379031@linuxfoundation.org> References: <20200526183937.471379031@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Philipp Rudo commit 70b690547d5ea1a3d135a4cc39cd1e08246d0c3a upstream. initrd_start must not point at the location the initrd is loaded into the crashkernel memory but at the location it will be after the crashkernel memory is swapped with the memory at 0. Fixes: ee337f5469fd ("s390/kexec_file: Add crash support to image loader") Reported-by: Lianbo Jiang Signed-off-by: Philipp Rudo Tested-by: Lianbo Jiang Link: https://lore.kernel.org/r/20200512193956.15ae3f23@laptop2-ibm.local Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/machine_kexec_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kernel/machine_kexec_file.c +++ b/arch/s390/kernel/machine_kexec_file.c @@ -151,7 +151,7 @@ static int kexec_file_add_initrd(struct buf.mem += crashk_res.start; buf.memsz = buf.bufsz; - data->parm->initrd_start = buf.mem; + data->parm->initrd_start = data->memsz; data->parm->initrd_size = buf.memsz; data->memsz += buf.memsz;