diff options
author | Nitin Gupta <nitin.m.gupta@oracle.com> | 2017-03-03 23:40:44 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-28 06:20:22 +0200 |
commit | 59f1183dd368f12c0a80da3c91a4a42afa4e1d38 (patch) | |
tree | b5eadcd8b4f7ee29debfca7167beb8158f954124 /arch/sparc/mm | |
parent | Merge tag 'edac_for_4.11_2' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
download | linux-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.c | 2 |
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); |