* [patch] reset: NULL deref on allocation failure
@ 2013-04-03 5:02 Dan Carpenter
2013-04-04 7:49 ` Philipp Zabel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2013-04-03 5:02 UTC (permalink / raw)
To: kernel-janitors
"rstc" is NULL here and we should use "rcdev" instead of "rstc->rcdev".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index a258277..d1b6089 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -181,7 +181,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
rstc = kzalloc(sizeof(*rstc), GFP_KERNEL);
if (!rstc) {
- module_put(rstc->rcdev->owner);
+ module_put(rcdev->owner);
return ERR_PTR(-ENOMEM);
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch] reset: NULL deref on allocation failure
2013-04-03 5:02 [patch] reset: NULL deref on allocation failure Dan Carpenter
@ 2013-04-04 7:49 ` Philipp Zabel
2013-04-04 11:56 ` Shawn Guo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2013-04-04 7:49 UTC (permalink / raw)
To: kernel-janitors
Hi Dan,
Am Mittwoch, den 03.04.2013, 08:02 +0300 schrieb Dan Carpenter:
> "rstc" is NULL here and we should use "rcdev" instead of "rstc->rcdev".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> index a258277..d1b6089 100644
> --- a/drivers/reset/core.c
> +++ b/drivers/reset/core.c
> @@ -181,7 +181,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
>
> rstc = kzalloc(sizeof(*rstc), GFP_KERNEL);
> if (!rstc) {
> - module_put(rstc->rcdev->owner);
> + module_put(rcdev->owner);
> return ERR_PTR(-ENOMEM);
> }
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
thanks
Philipp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] reset: NULL deref on allocation failure
2013-04-03 5:02 [patch] reset: NULL deref on allocation failure Dan Carpenter
2013-04-04 7:49 ` Philipp Zabel
@ 2013-04-04 11:56 ` Shawn Guo
2013-04-04 12:13 ` Dan Carpenter
2013-04-09 8:08 ` Philipp Zabel
3 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2013-04-04 11:56 UTC (permalink / raw)
To: kernel-janitors
Philipp,
On Thu, Apr 04, 2013 at 09:49:36AM +0200, Philipp Zabel wrote:
> Hi Dan,
>
> Am Mittwoch, den 03.04.2013, 08:02 +0300 schrieb Dan Carpenter:
> > "rstc" is NULL here and we should use "rcdev" instead of "rstc->rcdev".
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> > index a258277..d1b6089 100644
> > --- a/drivers/reset/core.c
> > +++ b/drivers/reset/core.c
> > @@ -181,7 +181,7 @@ struct reset_control *reset_control_get(struct device *dev, const char *id)
> >
> > rstc = kzalloc(sizeof(*rstc), GFP_KERNEL);
> > if (!rstc) {
> > - module_put(rstc->rcdev->owner);
> > + module_put(rcdev->owner);
> > return ERR_PTR(-ENOMEM);
> > }
>
> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
>
I think you should take care of the patch to have it merged through the
same path that the 'reset API' series goes to mainline.
Shawn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] reset: NULL deref on allocation failure
2013-04-03 5:02 [patch] reset: NULL deref on allocation failure Dan Carpenter
2013-04-04 7:49 ` Philipp Zabel
2013-04-04 11:56 ` Shawn Guo
@ 2013-04-04 12:13 ` Dan Carpenter
2013-04-09 8:08 ` Philipp Zabel
3 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2013-04-04 12:13 UTC (permalink / raw)
To: kernel-janitors
On Thu, Apr 04, 2013 at 07:56:50PM +0800, Shawn Guo wrote:
> I think you should take care of the patch to have it merged through the
> same path that the 'reset API' series goes to mainline.
>
That's fine by me as well.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] reset: NULL deref on allocation failure
2013-04-03 5:02 [patch] reset: NULL deref on allocation failure Dan Carpenter
` (2 preceding siblings ...)
2013-04-04 12:13 ` Dan Carpenter
@ 2013-04-09 8:08 ` Philipp Zabel
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2013-04-09 8:08 UTC (permalink / raw)
To: kernel-janitors
Am Donnerstag, den 04.04.2013, 15:13 +0300 schrieb Dan Carpenter:
> On Thu, Apr 04, 2013 at 07:56:50PM +0800, Shawn Guo wrote:
> > I think you should take care of the patch to have it merged through the
> > same path that the 'reset API' series goes to mainline.
> >
>
> That's fine by me as well.
Ok, I've added the patch on top of the branch
git://git.pengutronix.de/git/pza/linux.git reset/for_v3.10
for Olof to pull.
regards
Philipp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-09 8:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 5:02 [patch] reset: NULL deref on allocation failure Dan Carpenter
2013-04-04 7:49 ` Philipp Zabel
2013-04-04 11:56 ` Shawn Guo
2013-04-04 12:13 ` Dan Carpenter
2013-04-09 8:08 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox