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: <fc2e78a7-d739-6e53-864b-75080e124585@amd.com>
Date:   Tue, 4 Dec 2018 14:39:52 +0800
From:   zhoucm1 <zhoucm1@....com>
To:     Wei Yongjun <weiyongjun1@...wei.com>, <alexander.deucher@....com>,
        <christian.koenig@....com>, <David1.Zhou@....com>,
        <airlied@...ux.ie>, <Rex.Zhu@....com>, <Monk.Liu@....com>
CC:     <amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH -next] drm/amdgpu: Fix return value check in
 amdgpu_allocate_static_csa()



On 2018年12月04日 14:39, Wei Yongjun wrote:
> Fix the return value check which testing the wrong variable
> in amdgpu_allocate_static_csa().
>
> Fixes: 7946340fa389 ("drm/amdgpu: Move csa related code to separate file")
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
> index 0c590dd..a5fbc6f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
> @@ -43,7 +43,7 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev, struct amdgpu_bo **bo
>   	r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE,
>   				domain, bo,
>   				NULL, &ptr);
> -	if (!bo)
> +	if (!r)
>   		return -ENOMEM;
I guess original is correct as well, if you want to change it, you can 
make like below, not your 'if (!r)':
                 if (r)
                         return r;

-David
>   
>   	memset(ptr, 0, size);
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ