summaryrefslogtreecommitdiffstats
path: root/mm/page_table_check.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-05-27 11:29:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-05-27 11:29:35 -0700
commit77fb622de1393b1d54f24f4f7ed98f84feeda502 (patch)
treec23243c07995b6a906b90ce4c0bfc1c514aab61f /mm/page_table_check.c
parent6f664045c8688c40ad0591abd6ab89db9ecd7945 (diff)
parent24c8e27e63224ce832b4723cb60632d3eddb55de (diff)
downloadlinux-stable-77fb622de1393b1d54f24f4f7ed98f84feeda502.tar.gz
linux-stable-77fb622de1393b1d54f24f4f7ed98f84feeda502.tar.bz2
linux-stable-77fb622de1393b1d54f24f4f7ed98f84feeda502.zip
Merge tag 'mm-hotfixes-stable-2022-05-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull hotfixes from Andrew Morton: "Six hotfixes. The page_table_check one from Miaohe Lin is considered a minor thing so it isn't marked for -stable. The remainder address pre-5.19 issues and are cc:stable" * tag 'mm-hotfixes-stable-2022-05-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm/page_table_check: fix accessing unmapped ptep kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] mm/page_alloc: always attempt to allocate at least one page during bulk allocation hugetlb: fix huge_pmd_unshare address update zsmalloc: fix races between asynchronous zspage free and page migration Revert "mm/cma.c: remove redundant cma_mutex lock"
Diffstat (limited to 'mm/page_table_check.c')
-rw-r--r--mm/page_table_check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_table_check.c b/mm/page_table_check.c
index 3692bea2ea2c..e2062748791a 100644
--- a/mm/page_table_check.c
+++ b/mm/page_table_check.c
@@ -234,11 +234,11 @@ void __page_table_check_pte_clear_range(struct mm_struct *mm,
pte_t *ptep = pte_offset_map(&pmd, addr);
unsigned long i;
- pte_unmap(ptep);
for (i = 0; i < PTRS_PER_PTE; i++) {
__page_table_check_pte_clear(mm, addr, *ptep);
addr += PAGE_SIZE;
ptep++;
}
+ pte_unmap(ptep - PTRS_PER_PTE);
}
}