From: Pawel Moll <pawel.moll@arm.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [patch] clk: vexpress: NULL dereference on error path
Date: Fri, 11 Apr 2014 11:57:47 +0000 [thread overview]
Message-ID: <1397217467.3549.92.camel@hornet> (raw)
In-Reply-To: <20140411115118.GQ4963@mwanda>
On Fri, 2014-04-11 at 12:51 +0100, Dan Carpenter wrote:
> On Fri, Nov 08, 2013 at 12:44:01PM +0000, Pawel Moll wrote:
> > On Fri, 2013-11-08 at 12:42 +0000, Pawel Moll wrote:
> > > On Thu, 2013-11-07 at 08:08 +0000, Dan Carpenter wrote:
> > > > If the allocation fails then we dereference the NULL in the error path.
> > > > Just return directly.
> > > >
> > > > Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
> > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
> > > > index 2dc8b41..a535c7b 100644
> > > > --- a/drivers/clk/versatile/clk-vexpress-osc.c
> > > > +++ b/drivers/clk/versatile/clk-vexpress-osc.c
> > > > @@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct device_node *node)
> > > >
> > > > osc = kzalloc(sizeof(*osc), GFP_KERNEL);
> > > > if (!osc)
> > > > - goto error;
> > > > + return;
> > > >
> > > > osc->func = vexpress_config_func_get_by_node(node);
> > > > if (!osc->func) {
> > >
> > > Well spotted, thanks!
> > >
> > > Will get it queued with other vexpress clk changes.
> >
> > Having said that - Mike, it's a bug fix. If you can still get it into
> > the current merge window, please do:
> >
> > Acked-by: Pawel Moll <pawel.moll@arm.com>
> >
>
> Heh. Let's try again to get this merged. :P
Right, my fault, haven't followed this up with Mike, sorry.
Pawel
WARNING: multiple messages have this Message-ID (diff)
From: pawel.moll@arm.com (Pawel Moll)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] clk: vexpress: NULL dereference on error path
Date: Fri, 11 Apr 2014 12:57:47 +0100 [thread overview]
Message-ID: <1397217467.3549.92.camel@hornet> (raw)
In-Reply-To: <20140411115118.GQ4963@mwanda>
On Fri, 2014-04-11 at 12:51 +0100, Dan Carpenter wrote:
> On Fri, Nov 08, 2013 at 12:44:01PM +0000, Pawel Moll wrote:
> > On Fri, 2013-11-08 at 12:42 +0000, Pawel Moll wrote:
> > > On Thu, 2013-11-07 at 08:08 +0000, Dan Carpenter wrote:
> > > > If the allocation fails then we dereference the NULL in the error path.
> > > > Just return directly.
> > > >
> > > > Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
> > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > >
> > > > diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
> > > > index 2dc8b41..a535c7b 100644
> > > > --- a/drivers/clk/versatile/clk-vexpress-osc.c
> > > > +++ b/drivers/clk/versatile/clk-vexpress-osc.c
> > > > @@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct device_node *node)
> > > >
> > > > osc = kzalloc(sizeof(*osc), GFP_KERNEL);
> > > > if (!osc)
> > > > - goto error;
> > > > + return;
> > > >
> > > > osc->func = vexpress_config_func_get_by_node(node);
> > > > if (!osc->func) {
> > >
> > > Well spotted, thanks!
> > >
> > > Will get it queued with other vexpress clk changes.
> >
> > Having said that - Mike, it's a bug fix. If you can still get it into
> > the current merge window, please do:
> >
> > Acked-by: Pawel Moll <pawel.moll@arm.com>
> >
>
> Heh. Let's try again to get this merged. :P
Right, my fault, haven't followed this up with Mike, sorry.
Pawel
next prev parent reply other threads:[~2014-04-11 11:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 8:08 [patch] clk: vexpress: NULL dereference on error path Dan Carpenter
2013-11-07 8:08 ` Dan Carpenter
2013-11-08 12:42 ` Pawel Moll
2013-11-08 12:42 ` Pawel Moll
2013-11-08 12:44 ` Pawel Moll
2013-11-08 12:44 ` Pawel Moll
2014-04-11 11:51 ` Dan Carpenter
2014-04-11 11:51 ` Dan Carpenter
2014-04-11 11:57 ` Pawel Moll [this message]
2014-04-11 11:57 ` Pawel Moll
2014-04-23 15:53 ` Pawel Moll
2014-04-23 15:53 ` Pawel Moll
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=1397217467.3549.92.camel@hornet \
--to=pawel.moll@arm.com \
--cc=linux-arm-kernel@lists.infradead.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.