From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by kanga.kvack.org (Postfix) with ESMTP id DD3B66B0005 for ; Thu, 7 Apr 2016 01:37:55 -0400 (EDT) Received: by mail-pa0-f44.google.com with SMTP id bx7so31736513pad.3 for ; Wed, 06 Apr 2016 22:37:55 -0700 (PDT) Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com. [125.16.236.5]) by mx.google.com with ESMTPS id xh9si9361025pab.3.2016.04.06.22.37.54 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 06 Apr 2016 22:37:55 -0700 (PDT) Received: from localhost by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Apr 2016 11:07:52 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u375bo9210027392 for ; Thu, 7 Apr 2016 11:07:51 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u375bjCp005983 for ; Thu, 7 Apr 2016 11:07:50 +0530 From: Anshuman Khandual Subject: [PATCH 01/10] mm/mmap: Replace SHM_HUGE_MASK with MAP_HUGE_MASK inside mmap_pgoff Date: Thu, 7 Apr 2016 11:07:35 +0530 Message-Id: <1460007464-26726-2-git-send-email-khandual@linux.vnet.ibm.com> In-Reply-To: <1460007464-26726-1-git-send-email-khandual@linux.vnet.ibm.com> References: <1460007464-26726-1-git-send-email-khandual@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: hughd@google.com, kirill@shutemov.name, n-horiguchi@ah.jp.nec.com, akpm@linux-foundation.org, mgorman@techsingularity.net, dave.hansen@intel.com, aneesh.kumar@linux.vnet.ibm.com, mpe@ellerman.id.au The commit 091d0d55b286 ("shm: fix null pointer deref when userspace specifies invalid hugepage size") had replaced MAP_HUGE_MASK with SHM_HUGE_MASK. Though both of them contain the same numeric value of 0x3f, MAP_HUGE_MASK flag sounds more appropriate than the other one in the context. Hence change it back. Signed-off-by: Anshuman Khandual --- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mmap.c b/mm/mmap.c index bd2e1a53..7d730a4 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1315,7 +1315,7 @@ SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len, struct user_struct *user = NULL; struct hstate *hs; - hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) & SHM_HUGE_MASK); + hs = hstate_sizelog((flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK); if (!hs) return -EINVAL; -- 2.1.0 -- 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