* [patch] clk: vexpress: NULL dereference on error path
@ 2013-11-07 8:08 Dan Carpenter
2013-11-08 12:42 ` Pawel Moll
0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2013-11-07 8:08 UTC (permalink / raw)
To: linux-arm-kernel
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) {
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [patch] clk: vexpress: NULL dereference on error path
2013-11-07 8:08 [patch] clk: vexpress: NULL dereference on error path Dan Carpenter
@ 2013-11-08 12:42 ` Pawel Moll
2013-11-08 12:44 ` Pawel Moll
0 siblings, 1 reply; 6+ messages in thread
From: Pawel Moll @ 2013-11-08 12:42 UTC (permalink / raw)
To: linux-arm-kernel
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.
Pawe?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch] clk: vexpress: NULL dereference on error path
2013-11-08 12:42 ` Pawel Moll
@ 2013-11-08 12:44 ` Pawel Moll
2014-04-11 11:51 ` Dan Carpenter
0 siblings, 1 reply; 6+ messages in thread
From: Pawel Moll @ 2013-11-08 12:44 UTC (permalink / raw)
To: linux-arm-kernel
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>
Pawe?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch] clk: vexpress: NULL dereference on error path
2013-11-08 12:44 ` Pawel Moll
@ 2014-04-11 11:51 ` Dan Carpenter
2014-04-11 11:57 ` Pawel Moll
0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2014-04-11 11:51 UTC (permalink / raw)
To: linux-arm-kernel
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
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch] clk: vexpress: NULL dereference on error path
2014-04-11 11:51 ` Dan Carpenter
@ 2014-04-11 11:57 ` Pawel Moll
2014-04-23 15:53 ` Pawel Moll
0 siblings, 1 reply; 6+ messages in thread
From: Pawel Moll @ 2014-04-11 11:57 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch] clk: vexpress: NULL dereference on error path
2014-04-11 11:57 ` Pawel Moll
@ 2014-04-23 15:53 ` Pawel Moll
0 siblings, 0 replies; 6+ messages in thread
From: Pawel Moll @ 2014-04-23 15:53 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 2014-04-11 at 12:57 +0100, Pawel Moll wrote:
> > > 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.
Mike, will you take it in as a fix for 3.15, or do you want me to queue
it with other vexpress fixes and go through arm-soc?
Cheers!
Pawel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-04-23 15:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 8:08 [patch] clk: vexpress: NULL dereference on error path Dan Carpenter
2013-11-08 12:42 ` Pawel Moll
2013-11-08 12:44 ` Pawel Moll
2014-04-11 11:51 ` Dan Carpenter
2014-04-11 11:57 ` Pawel Moll
2014-04-23 15:53 ` Pawel Moll
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).