Naoya Horiguchi 48684a65b4 mm: pagewalk: fix misbehavior of walk_page_range for vma(VM_PFNMAP)
walk_page_range() silently skips vma having VM_PFNMAP set, which leads to
undesirable behaviour at client end (who called walk_page_range).  For
example for pagemap_read(), when no callbacks are called against VM_PFNMAP
vma, pagemap_read() may prepare pagemap data for next virtual address
range at wrong index.  That could confuse and/or break userspace
applications.

This patch avoid this misbehavior caused by vma(VM_PFNMAP) like follows:
- for pagemap_read() which has its own ->pte_hole(), call the ->pte_hole()
  over vma(VM_PFNMAP),
- for clear_refs and queue_pages which have their own ->tests_walk,
  just return 1 and skip vma(VM_PFNMAP). This is no problem because
  these are not interested in hole regions,
- for other callers, just skip the vma(VM_PFNMAP) as a default behavior.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-11 17:06:06 -08:00
..
2014-11-19 13:01:20 -05:00
2014-12-13 12:42:51 -08:00
2014-08-08 15:57:24 -07:00
2014-11-19 13:01:20 -05:00
2014-11-19 13:01:20 -05:00
2014-12-14 16:10:09 -08:00
2014-12-18 19:08:10 -08:00
2014-08-07 14:40:09 -04:00
2014-11-28 18:23:44 -08:00
2015-01-09 15:51:08 -08:00
2014-01-25 03:14:05 -05:00
2014-11-19 13:01:20 -05:00
2014-12-14 16:10:09 -08:00
2015-02-05 16:34:25 +01:00
2014-08-07 14:40:09 -04:00
2014-11-19 13:01:20 -05:00
2014-12-08 20:39:29 -05:00
2014-12-10 21:31:59 -05:00
2014-12-18 11:22:02 -08:00
2014-05-06 17:39:42 -04:00
2014-04-01 23:19:08 -04:00
2014-08-26 09:35:56 +02:00
2013-11-09 00:16:31 -05:00
2014-11-10 10:06:18 +01:00
2014-11-19 13:01:25 -05:00
2014-11-19 13:01:26 -05:00