Re: [PATCH] perf/x86/uncore: avoid null-ptr-deref on error in pmu_alloc_topology

From: Fedor Pchelkin
Date: Thu Dec 12 2024 - 09:36:27 EST


On Sun, 04. Feb 16:48, Fedor Pchelkin wrote:
> If topology[die] array allocation fails then topology[die][idx] elements
> can't be accessed on error path.
>
> Checking this on the error path probably looks more readable than
> decrementing the counter in the allocation loop.
>
> Found by Linux Verification Center (linuxtesting.org).
>
> Fixes: 4d13be8ab5d4 ("perf/x86/intel/uncore: Generalize IIO topology support")
> Signed-off-by: Fedor Pchelkin <pchelkin@xxxxxxxxx>

Hi,

ping as the patch seems to have been missed. FWIW, it's still applicable to
the mainline.

--
Thanks,
Fedor