summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNitin Gupta <nitin.m.gupta@oracle.com>2017-03-03 14:40:44 -0800
committerDavid S. Miller <davem@davemloft.net>2017-03-27 21:20:22 -0700
commit59f1183dd368f12c0a80da3c91a4a42afa4e1d38 (patch)
treeb5eadcd8b4f7ee29debfca7167beb8158f954124 /arch
parentad0376eb1483bd9880770b346f6592aece669e4c (diff)
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')
-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);