From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 305066FA7 for ; Sun, 17 Sep 2023 19:30:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92F2AC433CA; Sun, 17 Sep 2023 19:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694979007; bh=5BAhze+cPqEDG53Ew8dQ8KlzPw0/V0e8APFHw74TYQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kEBocwboZLrKIL7efO8n/c+IBKUYlsl5Dh8G/YOobREbQEYhO+9o2rqVCkpX3DkWW zUr4FZHCNcY7InBGcBQ0IYGYPmoCFDUJJlscKP6RUWln2Gw1VXZKuQ9LhwYmZV02Tf 49tYakv/SbhlFRkxB4cwRPOnHLFF/Q8k0f7nbMDc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sourabh Jain , Mahesh Salgaonkar , Michael Ellerman , Sasha Levin Subject: [PATCH 5.10 186/406] powerpc/fadump: reset dump area size if fadump memory reserve fails Date: Sun, 17 Sep 2023 21:10:40 +0200 Message-ID: <20230917191106.116635384@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191101.035638219@linuxfoundation.org> References: <20230917191101.035638219@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sourabh Jain [ Upstream commit d1eb75e0dfed80d2d85b664e28a39f65b290ab55 ] In case fadump_reserve_mem() fails to reserve memory, the reserve_dump_area_size variable will retain the reserve area size. This will lead to /sys/kernel/fadump/mem_reserved node displaying an incorrect memory reserved by fadump. To fix this problem, reserve dump area size variable is set to 0 if fadump failed to reserve memory. Fixes: 8255da95e545 ("powerpc/fadump: release all the memory above boot memory size") Signed-off-by: Sourabh Jain Acked-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman Link: https://msgid.link/20230704050715.203581-1-sourabhjain@linux.ibm.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/fadump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 1a5ba26aab156..935ce1bec43fa 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -642,6 +642,7 @@ int __init fadump_reserve_mem(void) return ret; error_out: fw_dump.fadump_enabled = 0; + fw_dump.reserve_dump_area_size = 0; return 0; } -- 2.40.1