From: Dan Carpenter <dan.carpenter@oracle.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Biju Das <biju.das.jz@bp.renesas.com>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] clk: renesas: fix a double free on error
Date: Thu, 17 Jun 2021 17:04:22 +0300 [thread overview]
Message-ID: <20210617140421.GP1901@kadam> (raw)
In-Reply-To: <CAMuHMdUfMSPa2Oh1s+V=QR+XLv2tVYoJt2sjwdNZeobE76AZwg@mail.gmail.com>
On Thu, Jun 17, 2021 at 03:45:50PM +0200, Geert Uytterhoeven wrote:
> Hi Dan,
>
> On Thu, Jun 17, 2021 at 3:38 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > The "clock" pointer is allocated with devm_kzalloc() so freeing it
> > here will lead to a double free.
> >
> > Fixes: ef3c613ccd68 ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Thanks for your patch!
>
> While the double free is unlikely to happen (the error is not
> propagated upstream, and the driver cannot be unloaded), kernel
> test robot reported two of these errors. The other one is at line 202.
> Care to fix that as well?
Yeah, sure. I'll clean up the NULL vs error pointer mixing as well.
regards,
dan carpenter
prev parent reply other threads:[~2021-06-17 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 13:37 [PATCH] clk: renesas: fix a double free on error Dan Carpenter
2021-06-17 13:45 ` Geert Uytterhoeven
2021-06-17 14:04 ` Dan Carpenter [this message]
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=20210617140421.GP1901@kadam \
--to=dan.carpenter@oracle.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=geert@linux-m68k.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.