aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hugepage-hash64.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2015-12-01 09:07:00 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-14 15:19:17 +1100
commit4dcbd88eb600d52ce52a75c5075c2eff2f6849e6 (patch)
tree852238526c85dd60f20e11c8f4c9be8f082bc7b2 /arch/powerpc/mm/hugepage-hash64.c
parentpowerpc/mm: Use H_READ with H_READ_4 (diff)
downloadlinux-dev-4dcbd88eb600d52ce52a75c5075c2eff2f6849e6.tar.xz
linux-dev-4dcbd88eb600d52ce52a75c5075c2eff2f6849e6.zip
powerpc/mm: Don't open code pgtable_t size
The slot information of base page size hash pte is stored in the pgtable_t w.r.t transparent hugepage. We need to make sure we don't index beyond pgtable_t size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/hugepage-hash64.c')
-rw-r--r--arch/powerpc/mm/hugepage-hash64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/hugepage-hash64.c b/arch/powerpc/mm/hugepage-hash64.c
index 1f666de0110a..baf1301ded0c 100644
--- a/arch/powerpc/mm/hugepage-hash64.c
+++ b/arch/powerpc/mm/hugepage-hash64.c
@@ -71,7 +71,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,
*/
shift = mmu_psize_defs[psize].shift;
index = (ea & ~HPAGE_PMD_MASK) >> shift;
- BUG_ON(index >= 4096);
+ BUG_ON(index >= PTE_FRAG_SIZE);
vpn = hpt_vpn(ea, vsid, ssize);
hpte_slot_array = get_hpte_slot_array(pmdp);