Commit a78d9e81 authored by Jason Zeng's avatar Jason Zeng
Browse files

mm/hugetlb: fix parameter passed to allocate bootmem memory

Intel inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7HUWC


CVE: NA

-----------------------------------------------

Intel-SIG: hugetlb: fix parameter passed to allocate bootmem memory

__alloc_bootmem_huge_page_inner() should use 'min_addr" as the
3rd parameter to invoke memblock_alloc_try_nid_raw() and
memblock_alloc_try_nid_raw_flags.

Fixes: 74bfdf15 ("mm/hugetlb: Hugetlb use non-mirrored memory if memory reliable is enabled")
Signed-off-by: default avatarJason Zeng <jason.zeng@intel.com>
parent c0a502be
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2735,10 +2735,10 @@ static void *__init __alloc_bootmem_huge_page_inner(phys_addr_t size,
						    int nid)
{
	if (!mem_reliable_is_enabled())
		return memblock_alloc_try_nid_raw(size, align, max_addr,
		return memblock_alloc_try_nid_raw(size, align, min_addr,
						  max_addr, nid);

	return memblock_alloc_try_nid_raw_flags(size, align, max_addr, max_addr,
	return memblock_alloc_try_nid_raw_flags(size, align, min_addr, max_addr,
						nid, MEMBLOCK_NOMIRROR);
}