aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorNaoya Horiguchi <[email protected]>2010-11-24 20:57:13 +0000
committerLinus Torvalds <[email protected]>2010-11-24 21:50:46 +0000
commitea251c1d5c481cda1cf6b0c9e4965f04a6cf2ffc (patch)
tree989753f439461fb333432761b8bf39d408572c62 /lib/dynamic_debug.c
parentmm: remove call to find_vma in pagewalk for non-hugetlbfs (diff)
downloadkernel-ea251c1d5c481cda1cf6b0c9e4965f04a6cf2ffc.tar.gz
kernel-ea251c1d5c481cda1cf6b0c9e4965f04a6cf2ffc.zip
pagemap: set pagemap walk limit to PMD boundary
Currently one pagemap_read() call walks in PAGEMAP_WALK_SIZE bytes (== 512 pages.) But there is a corner case where walk_pmd_range() accidentally runs over a VMA associated with a hugetlbfs file. For example, when a process has mappings to VMAs as shown below: # cat /proc/<pid>/maps ... 3a58f6d000-3a58f72000 rw-p 00000000 00:00 0 7fbd51853000-7fbd51855000 rw-p 00000000 00:00 0 7fbd5186c000-7fbd5186e000 rw-p 00000000 00:00 0 7fbd51a00000-7fbd51c00000 rw-s 00000000 00:12 8614 /hugepages/test then pagemap_read() goes into walk_pmd_range() path and walks in the range 0x7fbd51853000-0x7fbd51a53000, but the hugetlbfs VMA should be handled by walk_hugetlb_range(). Otherwise PMD for the hugepage is considered bad and cleared, which causes undesirable results. This patch fixes it by separating pagemap walk range into one PMD. Signed-off-by: Naoya Horiguchi <[email protected]> Cc: Jun'ichi Nomura <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Matt Mackall <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions