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:   Sun, 9 Jan 2022 16:48:17 -0100
From:   Melissa Wen <mwen@...lia.com>
To:     Miaoqian Lin <linmq006@...il.com>
Cc:     dave.stevenson@...pberrypi.com, emma@...olt.net, airlied@...ux.ie,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        eric@...olt.net
Subject: Re: [PATCH v2] drm/v3d: Fix PM disable depth imbalance in
 v3d_platform_drm_probe

On 01/06, Miaoqian Lin wrote:
> The pm_runtime_enable will increase power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable().
> 
> Fixes: 57692c9 ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
> Changes in v2
> - put pm_runtime_disable before dma_free_wc
> - rename dma_free to pm_disable
> ---
>  drivers/gpu/drm/v3d/v3d_drv.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> index bd46396a1ae0..7d500dd5314e 100644
> --- a/drivers/gpu/drm/v3d/v3d_drv.c
> +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> @@ -282,7 +282,7 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
>  
>  	ret = v3d_gem_init(drm);
>  	if (ret)
> -		goto dma_free;
> +		goto pm_disable;
>  
>  	ret = v3d_irq_init(v3d);
>  	if (ret)
> @@ -298,7 +298,8 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
>  	v3d_irq_disable(v3d);
>  gem_destroy:
>  	v3d_gem_destroy(drm);
> -dma_free:
> +pm_disable:
> +	pm_runtime_disable(dev);

Hi,

I see this pm_runtime_disable balancing is also missing for
v3d_platform_drm_remove(), right?

BR,

Melissa
>  	dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr);
>  	return ret;
>  }
> -- 
> 2.17.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ