powerpc/mm/hash: Free the subpage_prot_table correctly
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Sat, 17 Jun 2017 14:30:55 +0000 (20:00 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 27 Jul 2017 03:05:50 +0000 (13:05 +1000)
Fixes: dad6f37c2602e ("powerpc: subpage_protect: Increase the array size to take care of 64TB")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tested-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/subpage-prot.c

index e94fbd4c88458aa5953a271b1ef1eac0ef5c5c66..781532d7bc4d29683ab2ac72cff6f0ad7d4d01f4 100644 (file)
@@ -36,7 +36,7 @@ void subpage_prot_free(struct mm_struct *mm)
                }
        }
        addr = 0;
-       for (i = 0; i < 2; ++i) {
+       for (i = 0; i < (TASK_SIZE_USER64 >> 43); ++i) {
                p = spt->protptrs[i];
                if (!p)
                        continue;