Re: [PATCH] powerpc/smp: Handle of_property_count_u32_elems() error in parse_thread_groups()

From
Nathan Chancellor <nathan@kernel.org>
Date
2026-11-11 04:27:11
Also in
lkml
Reply to
Shrikanth Hegde, 2026-11-10
On Tue, Nov 10, 2026 at 02:58:32PM +0530, Shrikanth Hegde wrote:
Looks fine to me.
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Thanks a lot for taking a look!
Should the similar fix is needed here as well?

arch/powerpc/platforms/powernv/idle.c:
        nr_idle_states = of_property_count_u32_elems(np,
                                                "ibm,cpu-idle-state-flags");

        pnv_idle_states = kzalloc_objs(*pnv_idle_states, nr_idle_states);
        temp_u32 = kzalloc_objs(u32, nr_idle_states);
        temp_u64 = kzalloc_objs(u64, nr_idle_states);
        temp_string = kcalloc(nr_idle_states, sizeof(char *),  GFP_KERNEL);
More than likely. Maybe someone from IBM can validate and send a patch.

-- 
Cheers,
Nathan
Thread (4 messages) 4 messages, 3 authors, last reply 6d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help