]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
MIPS: CPS: Fix potential NULL pointer dereferences in cps_prepare_cpus()
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 7 Apr 2025 16:32:21 +0000 (18:32 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sun, 27 Apr 2025 08:13:22 +0000 (10:13 +0200)
commit7f74c066e5d920b3a2f0f936060984e3b3709250
tree65991c763a1bf495fa84d8a0ffda1e9e02768a05
parentcc3e3d3a9d09456cf21694b7ea8b9d781e85fda3
MIPS: CPS: Fix potential NULL pointer dereferences in cps_prepare_cpus()

Check the return values of kcalloc() and exit early to avoid potential
NULL pointer dereferences.

Compile-tested only.

Cc: stable@vger.kernel.org
Fixes: 75fa6a583882e ("MIPS: CPS: Introduce struct cluster_boot_config")
Fixes: 0856c143e1cd3 ("MIPS: CPS: Boot CPUs in secondary clusters")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/smp-cps.c