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>
This commit is contained in:
Nitin Gupta 2017-03-03 14:40:44 -08:00 committed by David S. Miller
parent ad0376eb14
commit 59f1183dd3
1 changed files with 1 additions and 1 deletions

View File

@ -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);