Unverified Commit b36be8b1 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11698 x86/mm: Fix pti_clone_pgtable() alignment assumption

parents 68635247 c15bbec5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -374,14 +374,14 @@ pti_clone_pgtable(unsigned long start, unsigned long end,
			 */
			*target_pmd = *pmd;

			addr += PMD_SIZE;
			addr = round_up(addr + 1, PMD_SIZE);

		} else if (level == PTI_CLONE_PTE) {

			/* Walk the page-table down to the pte level */
			pte = pte_offset_kernel(pmd, addr);
			if (pte_none(*pte)) {
				addr += PAGE_SIZE;
				addr = round_up(addr + 1, PAGE_SIZE);
				continue;
			}

@@ -401,7 +401,7 @@ pti_clone_pgtable(unsigned long start, unsigned long end,
			/* Clone the PTE */
			*target_pte = *pte;

			addr += PAGE_SIZE;
			addr = round_up(addr + 1, PAGE_SIZE);

		} else {
			BUG();