mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-30 04:40:06 +00:00
The mmap lock protects the page walker from changes to the page tables
during the walk. However a read lock is insufficient to protect those
areas which don't have a VMA as munmap() detaches the VMAs before
downgrading to a read lock and actually tearing down PTEs/page tables.
For users of walk_page_range() the solution is to simply call pte_hole()
immediately without checking the actual page tables when a VMA is not
present. We now never call __walk_page_range() without a valid vma.
For walk_page_range_novma() the locking requirements are tightened to
require the mmap write lock to be taken, and then walking the pgd
directly with 'no_vma' set.
This in turn means that all page walkers either have a valid vma, or
it's that special 'novma' case for page table debugging. As a result,
all the odd '(!walk->vma && !walk->no_vma)' tests can be removed.
Fixes:
|
||
|---|---|---|
| .. | ||
| cacheflush.c | ||
| context.c | ||
| dma-noncoherent.c | ||
| extable.c | ||
| fault.c | ||
| hugetlbpage.c | ||
| init.c | ||
| kasan_init.c | ||
| Makefile | ||
| pageattr.c | ||
| physaddr.c | ||
| ptdump.c | ||
| tlbflush.c | ||