summaryrefslogtreecommitdiffstats
path: root/mm/Kconfig
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2015-11-06 03:48:14 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 04:34:48 +0100
commit87e8827b37c0c391d9915d0dc6a06c9b5f9cac65 (patch)
tree9164f29c1f758212177668b95eb3363bda501240 /mm/Kconfig
parentmm: fix overflow in find_zone_movable_pfns_for_nodes() (diff)
downloadlinux-87e8827b37c0c391d9915d0dc6a06c9b5f9cac65.tar.xz
linux-87e8827b37c0c391d9915d0dc6a06c9b5f9cac65.zip
mm: fix the racy mm->locked_vm change in
"mm->locked_vm += grow" and vm_stat_account() in acct_stack_growth() are not safe; multiple threads using the same ->mm can do this at the same time trying to expans different vma's under down_read(mmap_sem). This means that one of the "locked_vm += grow" changes can be lost and we can miss munlock_vma_pages_all() later. Move this code into the caller(s) under mm->page_table_lock. All other updates to ->locked_vm hold mmap_sem for writing. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Hugh Dickins <hughd@google.com> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/Kconfig')
0 files changed, 0 insertions, 0 deletions