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:   Mon, 11 Dec 2017 18:51:40 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Flavio Ceolin <flavio.ceolin@...el.com>
Cc:     linux-kernel@...r.kernel.org,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Petr Cvek <petr.cvek@....cz>,
        Sakari Ailus <sakari.ailus@....fi>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        Julia Lawall <Julia.Lawall@...6.fr>,
        Arnd Bergmann <arnd@...db.de>,
        "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" 
        <linux-media@...r.kernel.org>
Subject: Re: [PATCH] media: pxa_camera: disable and unprepare the clock source on error

Hi Flavio,

Thank you for the patch.

On Wednesday, 6 December 2017 18:38:50 EET Flavio Ceolin wrote:
> pxa_camera_probe() was not calling pxa_camera_deactivate(),
> responsible to call clk_disable_unprepare(), on the failure path. This
> was leading to unbalancing source clock.
> 
> Found by Linux Driver Verification project (linuxtesting.org).

Any chance I could sign you up for more work on this driver ? :-)

> Signed-off-by: Flavio Ceolin <flavio.ceolin@...el.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

I expect Hans Verkuil to pick up the patch.

> ---
>  drivers/media/platform/pxa_camera.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/pxa_camera.c
> b/drivers/media/platform/pxa_camera.c index 9d3f0cb..7877037 100644
> --- a/drivers/media/platform/pxa_camera.c
> +++ b/drivers/media/platform/pxa_camera.c
> @@ -2489,7 +2489,7 @@ static int pxa_camera_probe(struct platform_device
> *pdev) dev_set_drvdata(&pdev->dev, pcdev);
>  	err = v4l2_device_register(&pdev->dev, &pcdev->v4l2_dev);
>  	if (err)
> -		goto exit_free_dma;
> +		goto exit_deactivate;
> 
>  	pcdev->asds[0] = &pcdev->asd;
>  	pcdev->notifier.subdevs = pcdev->asds;
> @@ -2525,6 +2525,8 @@ static int pxa_camera_probe(struct platform_device
> *pdev) v4l2_clk_unregister(pcdev->mclk_clk);
>  exit_free_v4l2dev:
>  	v4l2_device_unregister(&pcdev->v4l2_dev);
> +exit_deactivate:
> +	pxa_camera_deactivate(pcdev);
>  exit_free_dma:
>  	dma_release_channel(pcdev->dma_chans[2]);
>  exit_free_dma_u:

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ