summaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorNitin Gupta <nitin.m.gupta@oracle.com>2017-03-03 23:40:44 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-28 06:20:22 +0200
commit59f1183dd368f12c0a80da3c91a4a42afa4e1d38 (patch)
treeb5eadcd8b4f7ee29debfca7167beb8158f954124 /arch/sparc/mm
parentMerge tag 'edac_for_4.11_2' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
downloadlinux-59f1183dd368f12c0a80da3c91a4a42afa4e1d38.tar.xz
linux-59f1183dd368f12c0a80da3c91a4a42afa4e1d38.zip
sparc64: Fix size check in huge_pte_alloc
Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/hugetlbpage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c
index 323bc6b6e3ad..30168500603e 100644
--- a/arch/sparc/mm/hugetlbpage.c
+++ b/arch/sparc/mm/hugetlbpage.c
@@ -261,7 +261,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
if (!pmd)
return NULL;
- if (sz == PMD_SHIFT)
+ if (sz >= PMD_SIZE)
pte = (pte_t *)pmd;
else
pte = pte_alloc_map(mm, pmd, addr);