From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx179.postini.com [74.125.245.179]) by kanga.kvack.org (Postfix) with SMTP id A328B6B0027 for ; Wed, 3 Apr 2013 14:35:55 -0400 (EDT) From: Naoya Horiguchi Subject: [PATCH v3 2/3] fix hugetlb memory check in vma_dump_size() Date: Wed, 3 Apr 2013 14:35:37 -0400 Message-Id: <1365014138-19589-3-git-send-email-n-horiguchi@ah.jp.nec.com> In-Reply-To: <1365014138-19589-1-git-send-email-n-horiguchi@ah.jp.nec.com> References: <1365014138-19589-1-git-send-email-n-horiguchi@ah.jp.nec.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Mel Gorman , Hugh Dickins , Rik van Riel , KOSAKI Motohiro , Konstantin Khlebnikov , Michal Hocko , HATAYAMA Daisuke , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Naoya Horiguchi 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 Cc: stable@vger.kernel.org --- fs/binfmt_elf.c | 1 + 1 file changed, 1 insertion(+) diff --git v3.9-rc3.orig/fs/binfmt_elf.c v3.9-rc3/fs/binfmt_elf.c index 3939829..86af964 100644 --- v3.9-rc3.orig/fs/binfmt_elf.c +++ v3.9-rc3/fs/binfmt_elf.c @@ -1137,6 +1137,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, goto whole; if (!(vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_PRIVATE)) goto whole; + return 0; } /* Do not dump I/O mapped devices or special mappings */ -- 1.7.11.7 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org