powerpc/mm/hash: Free the subpage_prot_table correctly
PATCH 1/1 powerpc/mm/hash: Free the subpage_prot_table correctly
--- arch/powerpc/mm/subpage-prot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/subpage-prot.c +1 -1
@@ -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 ;
Signature · 1 line
2.7.4
This fix, resolved the OOM seen while running subpage_prot selftest, in a infinite loop.
Quoted 21 lines · Aneesh Kumar K.V
Fixes dad6f37c2602e ("powerpc: subpage_protect: Increase the array size to take care of 64TB")Signed-off-by Aneesh Kumar K.V <[email protected]>--- arch/powerpc/mm/subpage-prot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/mm/subpage-prot.c +1
-1@@ -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 ;Signature · 1 line
2.7.4
Signature · 1 line
Ram Pai
Quoted 3 lines · Ram Pai
This fix, resolved the OOM seen while running
subpage_protselftest, in a infinite loop.
The OOM is caused because of memory leaks by wrong freeing of the subpage_prot_table previously ?
Re: [PATCH] powerpc/mm/hash: Free the subpage_prot_table correctlyy
Quoted 7 lines · Anshuman Khandual
Quoted 3 lines · Ram Pai
This fix, resolved the OOM seen while running
subpage_protselftest, in a infinite loop.The OOM is caused because of memory leaks by wrong freeing of the
subpage_prot_tablepreviously ?
No. Rather, not freeing up of the memory allocated previously and tracked through the subpage_prot_table.
RP
Michael Ellerman
AppliedQuoted 3 lines · Aneesh Kumar K.V
Fixes dad6f37c2602e ("powerpc: subpage_protect: Increase the array size to take care of 64TB")Signed-off-by Aneesh Kumar K.V <[email protected]>Tested-by Ram Pai <[email protected]>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/0da12a7a81f1e2255e89dc783c565e
cheers