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]
Message-ID: <19432e4d-dcc4-5056-17ef-a6d2dd7b6fb4@xs4all.nl>
Date:   Thu, 17 Sep 2020 13:42:34 +0200
From:   Hans Verkuil <hverkuil@...all.nl>
To:     wu000273@....edu, kjlu@....edu
Cc:     Rick Chang <rick.chang@...iatek.com>,
        Bin Liu <bin.liu@...iatek.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Ricky Liang <jcliang@...omium.org>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Minghsiu Tsai <minghsiu.tsai@...iatek.com>,
        linux-media@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: mtk-jpeg: Fix a reference count leak.

On 14/06/2020 01:08, wu000273@....edu wrote:
> From: Qiushi Wu <wu000273@....edu>
> 
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code. Thus call pm_runtime_put_noidle()
> if pm_runtime_get_sync() fails.
> 
> Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver")
> Signed-off-by: Qiushi Wu <wu000273@....edu>
> ---
>  drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> index f82a81a3bdee..097f0b050f67 100644
> --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
> @@ -710,8 +710,10 @@ static int mtk_jpeg_start_streaming(struct vb2_queue *q, unsigned int count)
>  	int ret = 0;
>  
>  	ret = pm_runtime_get_sync(ctx->jpeg->dev);
> -	if (ret < 0)
> +	if (ret < 0) {
> +		pm_runtime_put_noidle(ctx->jpeg->dev);
>  		goto err;
> +	}
>  
>  	return 0;
>  err:
> 

This patch no longer applies, can you rebase this?

Regards,

	Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ