aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2021-07-07 20:11:24 +0000
committerLinus Torvalds <[email protected]>2021-07-11 22:05:15 +0000
commit023e1a8dd502405ba378a7fbb1ce62beb0616708 (patch)
treea460bbc7478c15f8cea3366785ad91607d0529fc /lib/string_helpers.c
parentmm/rmap: fix old bug: munlocking THP missed other mlocks (diff)
downloadkernel-023e1a8dd502405ba378a7fbb1ce62beb0616708.tar.gz
kernel-023e1a8dd502405ba378a7fbb1ce62beb0616708.zip
mm/rmap: fix new bug: premature return from page_mlock_one()
In the unlikely race case that page_mlock_one() finds VM_LOCKED has been cleared by the time it got page table lock, page_vma_mapped_walk_done() must be called before returning, either explicitly, or by a final call to page_vma_mapped_walk() - otherwise the page table remains locked. Fixes: cd62734ca60d ("mm/rmap: split try_to_munlock from try_to_unmap") Signed-off-by: Hugh Dickins <[email protected]> Reviewed-by: Alistair Popple <[email protected]> Reviewed-by: Shakeel Butt <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/lkml/20210711151446.GB4070@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/lkml/[email protected]/ Cc: Andrew Morton <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Ralph Campbell <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Yang Shi <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions