mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] [media] soc-camera: Remove bogus devm_kfree() in soc_of_bind()
Date: Wed, 18 Feb 2015 22:16:58 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.1502182216060.31387@axis700.grange> (raw)
In-Reply-To: <54E4D2DB.4050909@cogentembedded.com>

On Wed, 18 Feb 2015, Sergei Shtylyov wrote:

> Hello.
> 
> On 02/18/2015 07:32 PM, Geert Uytterhoeven wrote:
> 
> > Unlike scan_async_group(), soc_of_bind() doesn't allocate its
> > soc_camera_async_client structure using devm_kzalloc(), but has it
> > embedded inside the soc_of_info structure.  Hence on failure, it must
> > not free it using devm_kfree(), as this will cause a warning, and may
> > cause slab corruption:
> 
> [...]
> 
> > Fixes: 1ddc6a6caa94e1e1 ("[media] soc_camera: add support for dt binding
> > soc_camera drivers")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> > Triggered with shmobile-defconfig on r8a7791/koelsch.
> > ---
> >   drivers/media/platform/soc_camera/soc_camera.c | 1 -
> >   1 file changed, 1 deletion(-)
> 
> > diff --git a/drivers/media/platform/soc_camera/soc_camera.c
> > b/drivers/media/platform/soc_camera/soc_camera.c
> > index cee7b56f84049944..d8a072fe46035821 100644
> > --- a/drivers/media/platform/soc_camera/soc_camera.c
> > +++ b/drivers/media/platform/soc_camera/soc_camera.c
> > @@ -1665,7 +1665,6 @@ eclkreg:
> >   eaddpdev:
> >   	platform_device_put(sasc->pdev);
> >   eallocpdev:
> > -	devm_kfree(ici->v4l2_dev.dev, sasc);
> 
>    Perhaps Ben meant 'info' ISO 'sasc'? This way it would make more sense.

Agree. Geert, could you double-check and respin?

Thanks
Guennadi

> 
> >   	dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret);
> > 
> >   	return ret;
> 
> WBR, Sergei
> 

  reply	other threads:[~2015-02-18 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 16:32 Geert Uytterhoeven
2015-02-18 17:58 ` Sergei Shtylyov
2015-02-18 21:16   ` Guennadi Liakhovetski [this message]
2015-02-19  9:44     ` Geert Uytterhoeven

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=Pine.LNX.4.64.1502182216060.31387@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=ben.dooks@codethink.co.uk \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=stable@vger.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

all inboxes | Powered by JetHome®