]> git.baikalelectronics.ru Git - kernel.git/commit
mm: Fix TLB flush for not-first PFNMAP mappings in unmap_region()
authorJann Horn <jannh@google.com>
Thu, 15 Sep 2022 14:25:19 +0000 (16:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2022 10:28:00 +0000 (12:28 +0200)
commita65805be4a9a0f5ef4e5d01a9cbd33a5bbf8c50d
tree995bf649f5da61f7cee7d2f366c0c860f631f2e7
parentf00cc0ac1d565dfaf3b1f8fb979c795cf29ec36f
mm: Fix TLB flush for not-first PFNMAP mappings in unmap_region()

This is a stable-specific patch.
I botched the stable-specific rewrite of
commit f55f2908ef381 ("mmu_gather: Force tlb-flush VM_PFNMAP vmas"):
As Hugh pointed out, unmap_region() actually operates on a list of VMAs,
and the variable "vma" merely points to the first VMA in that list.
So if we want to check whether any of the VMAs we're operating on is
PFNMAP or MIXEDMAP, we have to iterate through the list and check each VMA.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/mmap.c