projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9bae18
)
thp: avoid dumping huge zero page
author
Kirill A. Shutemov
<
[email protected]
>
Mon, 4 Feb 2013 22:28:42 +0000
(14:28 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 5 Feb 2013 09:38:46 +0000
(20:38 +1100)
No reason to preserve the huge zero page in core dumps.
Reported-by: Michel Lespinasse <
[email protected]
>
Signed-off-by: Kirill A. Shutemov <
[email protected]
>
Reviewed-by: Michel Lespinasse <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/huge_memory.c
patch
|
blob
|
history
diff --git
a/mm/huge_memory.c
b/mm/huge_memory.c
index 6001ee6347a9694f4a9b31ef9060913ff30440bf..b5783d81eda90fc9a808478ac6dcea4f74b4424e 100644
(file)
--- 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) {