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] [day] [month] [year] [list]
Message-ID: <20250327231518.GM4861@pendragon.ideasonboard.com>
Date: Fri, 28 Mar 2025 01:15:18 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc: linux-media@...r.kernel.org,
	Jacopo Mondi <jacopo.mondi@...asonboard.com>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Benoit Parrot <bparrot@...com>,
	Kieran Bingham <kieran.bingham@...asonboard.com>,
	Jai Luthra <jai.luthra@...asonboard.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/3] media: ti: cal: Fix wrong goto on error path

Hi Tomi,

Thank you for the patch.

On Wed, Mar 26, 2025 at 01:34:02PM +0200, Tomi Valkeinen wrote:
> If pm_runtime_resume_and_get() fails, we should unprepare the context,
> but currently we skip that as we goto to a later line.
> 
> Reviewed-by: Kieran Bingham <kieran.bingham@...asonboard.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>

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

> ---
>  drivers/media/platform/ti/cal/cal-video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/ti/cal/cal-video.c b/drivers/media/platform/ti/cal/cal-video.c
> index 4eb77f46f030..29c38bf8d7a1 100644
> --- a/drivers/media/platform/ti/cal/cal-video.c
> +++ b/drivers/media/platform/ti/cal/cal-video.c
> @@ -744,7 +744,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
>  
>  	ret = pm_runtime_resume_and_get(ctx->cal->dev);
>  	if (ret < 0)
> -		goto error_pipeline;
> +		goto error_unprepare;
>  
>  	cal_ctx_set_dma_addr(ctx, addr);
>  	cal_ctx_start(ctx);
> @@ -761,8 +761,8 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
>  error_stop:
>  	cal_ctx_stop(ctx);
>  	pm_runtime_put_sync(ctx->cal->dev);
> +error_unprepare:
>  	cal_ctx_unprepare(ctx);
> -
>  error_pipeline:
>  	video_device_pipeline_stop(&ctx->vdev);
>  error_release_buffers:

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ