lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Feb 2015 22:16:58 +0100 (CET)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
cc:	Geert Uytterhoeven <geert+renesas@...der.be>,
	Ben Dooks <ben.dooks@...ethink.co.uk>,
	Mauro Carvalho Chehab <m.chehab@...sung.com>,
	linux-media@...r.kernel.org, linux-sh@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] [media] soc-camera: Remove bogus devm_kfree() in
 soc_of_bind()

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@...r.kernel.org
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ