diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-05 20:38:59 +1100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-05 20:38:59 +1100 |
commit | 3296944e29a048c06c5d724ef5c2c8c6e1297161 (patch) | |
tree | 57ffef4f8e20f9f025efb3ec796da6ed6b2a8a7a /mm/huge_memory.c | |
parent | 3f4e5aacf754bad84dd54826ea3a77983e201c80 (diff) | |
parent | e7e034e18a0ab6bafb2425c3242cac311164f4d6 (diff) |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge mix fixes from Andrew Morton.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (12 commits)
drivers/rtc/rtc-pl031.c: fix the missing operation on enable
drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq handler
samples/seccomp: be less stupid about cross compiling
checkpatch: fix $Float creation of match variables
memcg: fix typo in kmemcg cache walk macro
mm: fix wrong comments about anon_vma lock
MAINTAINERS: update avr32 web ressources
mm/hugetlb: set PTE as huge in hugetlb_change_protection and remove_migration_pte
drivers/rtc/rtc-vt8500.c: fix year field in vt8500_rtc_set_time()
tools/vm: add .gitignore to ignore built binaries
thp: avoid dumping huge zero page
nilfs2: fix fix very long mount time issue
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 6001ee6347a..b5783d81eda 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1257,6 +1257,10 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, if (flags & FOLL_WRITE && !pmd_write(*pmd)) goto out; + /* Avoid dumping huge zero page */ + if ((flags & FOLL_DUMP) && is_huge_zero_pmd(*pmd)) + return ERR_PTR(-EFAULT); + page = pmd_page(*pmd); VM_BUG_ON(!PageHead(page)); if (flags & FOLL_TOUCH) { |