Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964969Ab3DJQTj (ORCPT ); Wed, 10 Apr 2013 12:19:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2057 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937008Ab3DJQTg (ORCPT ); Wed, 10 Apr 2013 12:19:36 -0400 From: Naoya Horiguchi 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 Subject: [RESEND][PATCH v5 2/3] fix hugetlb memory check in vma_dump_size() Date: Wed, 10 Apr 2013 12:17:48 -0400 Message-Id: <1365610669-16625-3-git-send-email-n-horiguchi@ah.jp.nec.com> In-Reply-To: <1365610669-16625-1-git-send-email-n-horiguchi@ah.jp.nec.com> References: <1365610669-16625-1-git-send-email-n-horiguchi@ah.jp.nec.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 39 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 Reviewed-by: Rik van Riel Acked-by: Michal Hocko Reviewed-by: HATAYAMA Daisuke Acked-by: KOSAKI Motohiro 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/