From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 31CA2C433E0 for ; Mon, 8 Jun 2020 23:20:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08A382166E for ; Mon, 8 Jun 2020 23:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591658404; bh=Sp34QcXNnxLdREDvyYQ8VkxY0hFWQfze28x7WgtpEng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TKafoHGJhlAFE4pt+nLSqeWgPkYNpPu+pM4Mh3bMtsnIYRg3mmNpKbrtzURLtLOaX SBAbD9BhJBHijyVFmF8q0838lA5D4PHGUU9gREKpFNHvyEbZcrzqL0bd1CMTHFVvdS uTplSBkydETdf7Ygia1Qhg1ibnl0KygEYPimf1SQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730902AbgFHXUC (ORCPT ); Mon, 8 Jun 2020 19:20:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:37450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730187AbgFHXQK (ORCPT ); Mon, 8 Jun 2020 19:16:10 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BE0FC2078C; Mon, 8 Jun 2020 23:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591658170; bh=Sp34QcXNnxLdREDvyYQ8VkxY0hFWQfze28x7WgtpEng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zQb/Vxt9S8uG+OXBaQhP1uMQEfso667h4nxPrawSUI2s+yEOgyvbEzelmVdQEUPJZ 0vZ6JrnS+3/31zVO4YFwuoVZZiqd2agkIlESUzjaEPeGODji9wsjXG5F7n2WiI7Afb TWxmGMt4y9SRwApvo5N5VqB6nVyfPaE6K3ightUQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Philipp Rudo , Lianbo Jiang , Christian Borntraeger , Vasily Gorbik , Greg Kroah-Hartman , linux-s390@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 197/606] s390/kexec_file: fix initrd location for kdump kernel Date: Mon, 8 Jun 2020 19:05:22 -0400 Message-Id: <20200608231211.3363633-197-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608231211.3363633-1-sashal@kernel.org> References: <20200608231211.3363633-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c index 8415ae7d2a23..f9e4baa64b67 100644 --- 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 kimage *image, 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; -- 2.25.1