From: Aneesh Kumar K.V Date: Sat, 17 Jun 2017 14:30:55 +0000 (+0530) Subject: powerpc/mm/hash: Free the subpage_prot_table correctly X-Git-Tag: v4.13-rc3~11^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0da12a7a81f1e2255e89dc783c565e84801475a2;p=linux-2.6-block.git powerpc/mm/hash: Free the subpage_prot_table correctly Fixes: dad6f37c2602e ("powerpc: subpage_protect: Increase the array size to take care of 64TB") Signed-off-by: Aneesh Kumar K.V Tested-by: Ram Pai Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c index e94fbd4c8845..781532d7bc4d 100644 --- a/arch/powerpc/mm/subpage-prot.c +++ b/arch/powerpc/mm/subpage-prot.c @@ -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;