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: <0ba294a9-1428-98cf-93b6-f9a195924a8f@amd.com>
Date:   Tue, 18 Jan 2022 19:33:14 +0530
From:   "Lazar, Lijo" <lijo.lazar@....com>
To:     Yongzhi Liu <lyz_cs@....edu.cn>, airlied@...ux.ie, daniel@...ll.ch,
        nirmoy.das@....com, Jingwen.Chen2@....com, evan.quan@....com,
        Jack.Zhang1@....com, kevin1.wang@....com, tom.stdenis@....com
Cc:     amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu: Add missing pm_runtime_put_autosuspend



On 1/18/2022 5:31 PM, Yongzhi Liu wrote:
> pm_runtime_get_sync() increments the runtime PM usage counter even
> when it returns an error code, thus a matching decrement is needed
> on the error handling path to keep the counter balanced.
> 
> Signed-off-by: Yongzhi Liu <lyz_cs@....edu.cn>

Thanks!

Reviewed-by: Lijo Lazar <lijo.lazar@....com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 9aea1cc..4b950de 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -1120,8 +1120,10 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf,
>   		return -EINVAL;
>   
>   	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
> -	if (r < 0)
> +	if (r < 0) {
> +		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
>   		return r;
> +	}
>   
>   	while (size) {
>   		uint32_t value;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ