path: root/fs
diff options
authorNaoya Horiguchi2013-04-17 17:58:28 -0500
committerGreg Kroah-Hartman2013-04-25 14:51:09 -0500
commiteb586a6aac367fe5589ae115d470c2c2de45f6fb (patch)
treecfeb084fc243de2b256fbdacab3b72a07c365228 /fs
parentbff55c65c423aad2d509e01e6703f098620b3c58 (diff)
fs/binfmt_elf.c: fix hugetlb memory check in vma_dump_size()
commit 23d9e482136e31c9d287633a6e473daa172767c4 upstream. Documentation/filesystems/proc.txt says about coredump_filter bitmask, Note bit 0-4 doesn't effect any hugetlb memory. hugetlb memory are only effected by bit 5-6. However current code can go into the subsequent flag checks of bit 0-4 for vma(VM_HUGETLB). So this patch inserts 'return' and makes it work as written in the document. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: Rik van Riel <riel@redhat.com> Acked-by: Michal Hocko <mhocko@suse.cz> Reviewed-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 0c42cdbabecf..5843a4740f64 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1132,6 +1132,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
1132 goto whole; 1132 goto whole;
1133 if (!(vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_PRIVATE)) 1133 if (!(vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_PRIVATE))
1134 goto whole; 1134 goto whole;
1135 return 0;
1135 } 1136 }
1136 1137
1137 /* Do not dump I/O mapped devices or special mappings */ 1138 /* Do not dump I/O mapped devices or special mappings */