[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250505231817.2697367-23-sashal@kernel.org>
Date: Mon, 5 May 2025 19:16:46 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Tiwei Bie <tiwei.btw@...group.com>,
Johannes Berg <johannes.berg@...el.com>,
Sasha Levin <sashal@...nel.org>,
richard@....at,
anton.ivanov@...bridgegreys.com,
johannes@...solutions.net,
akpm@...ux-foundation.org,
rppt@...nel.org,
dave.hansen@...ux.intel.com,
benjamin.berg@...el.com,
richard.weiyang@...il.com,
kevin.brodsky@....com,
linux-um@...ts.infradead.org
Subject: [PATCH AUTOSEL 5.10 023/114] um: Update min_low_pfn to match changes in uml_reserved
From: Tiwei Bie <tiwei.btw@...group.com>
[ Upstream commit e82cf3051e6193f61e03898f8dba035199064d36 ]
When uml_reserved is updated, min_low_pfn must also be updated
accordingly. Otherwise, min_low_pfn will not accurately reflect
the lowest available PFN.
Signed-off-by: Tiwei Bie <tiwei.btw@...group.com>
Link: https://patch.msgid.link/20250221041855.1156109-1-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/um/kernel/mem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 9242dc91d7519..268a238f4f9cf 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -49,6 +49,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free(__pa(brk_end), uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();
--
2.39.5
Powered by blists - more mailing lists