aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <[email protected]>2015-02-11 15:27:31 -0800
committerLinus Torvalds <[email protected]>2015-02-11 17:06:05 -0800
commit05fbf357d94152171bc50f8a369390f1f16efd89 (patch)
tree656156ba6e3b055ef9353f0d17e92b59de49175b /net/lapb/lapb_subr.c
parent0664e57ff0c68cbca012a45a38288fa277eb6795 (diff)
proc/pagemap: walk page tables under pte lock
Lockless access to pte in pagemap_pte_range() might race with page migration and trigger BUG_ON(!PageLocked()) in migration_entry_to_page(): CPU A (pagemap) CPU B (migration) lock_page() try_to_unmap(page, TTU_MIGRATION...) make_migration_entry() set_pte_at() <read *pte> pte_to_pagemap_entry() remove_migration_ptes() unlock_page() if(is_migration_entry()) migration_entry_to_page() BUG_ON(!PageLocked(page)) Also lockless read might be non-atomic if pte is larger than wordsize. Other pte walkers (smaps, numa_maps, clear_refs) already lock ptes. Fixes: 052fb0d635df ("proc: report file/anon bit in /proc/pid/pagemap") Signed-off-by: Konstantin Khlebnikov <[email protected]> Reported-by: Andrey Ryabinin <[email protected]> Reviewed-by: Cyrill Gorcunov <[email protected]> Acked-by: Naoya Horiguchi <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Cc: <[email protected]> [3.5+] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions