]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: replace vma->vm_flags indirect modification in ksm_madvise
authorSuren Baghdasaryan <surenb@google.com>
Fri, 28 Oct 2022 23:34:48 +0000 (23:34 +0000)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 4 Jan 2023 20:59:25 +0000 (15:59 -0500)
commit5f625c04bb5998da01bb2cb7a5426e51bdceb795
tree9fcdec60c216a8a7e6f69f6a8b1265cdb207c124
parent9b991cf804cf7fc6981d7f55163eb359edcd96a0
mm: replace vma->vm_flags indirect modification in ksm_madvise

Replace indirect modifications to vma->vm_flags with calls to modifier
functions to be able to track flag changes and to keep vma locking
correctness. Add a BUG_ON check in ksm_madvise() to catch indirect
vm_flags modification attempts.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
arch/powerpc/kvm/book3s_hv_uvmem.c
arch/s390/mm/gmap.c
mm/khugepaged.c
mm/ksm.c