Re: [PATCH] Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name

From: Stephen Boyd
Date: Tue Sep 12 2023 - 13:59:56 EST


Quoting Alessandro Carminati (2023-09-12 10:05:19)
> Il giorno ven 8 set 2023 alle ore 23:25 Stephen Boyd
> <sboyd@xxxxxxxxxx> ha scritto:
> >
> > Is nothing actually wrong? And this is a speculative patch?
>
> In the current state, Linux can crash, so I would say that there's something
> wrong.
> I submitted this patch in response to a specific bug report that caused a
> kernel crash during testing.

Where is the bug report? On some public tracker? Can you link to it?

>
> >
> > All other arms of this conditional statement check the validity of the
> > pointer before printing the string. And when the parent isn't known we
> > print "(missing)", so it looks like we should do that instead. How about
> > this patch?
>
> Indeed, your patch appears to provide a more verbose coding and accurate
> message, which is valuable for troubleshooting.
> So yeah, for what it is worth, I think it is good as well.

Cool, can you send it after testing it out?