Re: [PATCH v4] MIPS: mm: kmalloc tlb_vpn array to avoid stack overflow

From: Maciej W. Rozycki

Date: Fri Nov 28 2025 - 11:57:16 EST


On Fri, 28 Nov 2025, Klara Modin wrote:

> > Owing to Config4.MMUSizeExt and VTLB/FTLB MMU features later MIPSr2+
> > cores can have more than 64 TLB entries. Therefore allocate an array
> > for uniquification instead of placing too small an array on the stack.
> >
> > Fixes: 35ad7e181541 ("MIPS: mm: tlb-r4k: Uniquify TLB entries on init")
> > Co-developed-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
> > Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
> > Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
> > Cc: stable@xxxxxxxxxxxxxxx # v6.17+: 9f048fa48740: MIPS: mm: Prevent a TLB shutdown on initial uniquification
> > Cc: stable@xxxxxxxxxxxxxxx # v6.17+
>
> This fixes a boot failure on my Edgerouter 6P (Cavium Octeon III).

Thank you for verification.

Maciej