[PATCH] powerpc/mm/hash: Free the subpage_prot_table correctly

Ram Pai linuxram at us.ibm.com
Sun Jun 18 02:00:19 AEST 2017


This fix, resolved the OOM seen while running subpage_prot selftest, in a
infinite loop.

Tested-by: Ram Pai <linuxram at us.ibm.com>


On Sat, Jun 17, 2017 at 08:00:55PM +0530, Aneesh Kumar K.V wrote:
> Fixes: dad6f37c2602e ("powerpc: subpage_protect: Increase the array size to take care of 64TB")
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/subpage-prot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> -- 
> 2.7.4

-- 
Ram Pai



More information about the Linuxppc-dev mailing list