From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: "André Draszik" <andre.draszik@linaro.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>
Subject: Re: [PATCH] clkdev: fix potential NULL pointer dereference
Date: Tue, 7 May 2024 18:58:16 +0100 [thread overview]
Message-ID: <ZjpruBO7iwcrz5ru@shell.armlinux.org.uk> (raw)
In-Reply-To: <e4ad92b88556f0de05b6b7ae03da1e581d688ce5.camel@linaro.org>
On Tue, May 07, 2024 at 05:42:45PM +0100, André Draszik wrote:
> Hi Marek,
>
> On Tue, 2024-05-07 at 08:44 +0200, Marek Szyprowski wrote:
> > diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
> > index ddacab7863d0..d2801ae70e34 100644
> > --- a/drivers/clk/clkdev.c
> > +++ b/drivers/clk/clkdev.c
> > @@ -194,10 +194,12 @@ vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
> > return &cla->cl;
> >
> > fail:
> > - fmt.fmt = dev_fmt;
> > - fmt.va = &ap_copy;
> > - pr_err("%pV:%s: %s ID is greater than %zu\n",
> > - &fmt, con_id, failure, max_size);
> > + if (dev_fmt) {
> > + fmt.fmt = dev_fmt;
> > + fmt.va = &ap_copy;
> > + pr_err("%pV:%s: %s ID is greater than %zu\n",
> > + &fmt, con_id, failure, max_size);
> > + }
>
> It might be nice to still print the rest of the error, so it's easier to see which
> clock is causing trouble.
Good point. I'll fix the patch myself, merging the fix in.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-07 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240507064445eucas1p1bfc17da4f824ef46567774634482f12f@eucas1p1.samsung.com>
2024-05-07 6:44 ` [PATCH] clkdev: fix potential NULL pointer dereference Marek Szyprowski
2024-05-07 9:34 ` Russell King (Oracle)
2024-05-07 16:42 ` André Draszik
2024-05-07 17:58 ` Russell King (Oracle) [this message]
2024-05-08 20:52 ` Sam Protsenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZjpruBO7iwcrz5ru@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andre.draszik@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).