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]
Date:   Thu, 15 Feb 2018 10:11:40 -0600
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     christian.koenig@....com,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Alex Deucher <alexander.deucher@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>
Cc:     dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amdgpu_gem: fix error handling path in
 amdgpu_gem_va_update_vm



On 02/15/2018 06:32 AM, Christian König wrote:
> Am 15.02.2018 um 06:20 schrieb Gustavo A. R. Silva:
>> Currently, if amdgpu_vm_bo_update() fails, the returned error
>> is being ignored.
>>
>> Fix this by properly checking _r_ after calling amdgpu_vm_bo_update.
>> Also, remove redundant code just before label _error_.
>>
>> Addresses-Coverity-ID: 1464280 ("Unused value")
>> Fixes: 0abc6878fc2d ("drm/amdgpu: update VM PDs after the PTs")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> 
> Reviewed-by: Christian König <christian.koenig@....com>
> 

Thanks, Christian
--
Gustavo

>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index e48b4ec..db85fc0 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -523,12 +523,13 @@ static void amdgpu_gem_va_update_vm(struct 
>> amdgpu_device *adev,
>>           goto error;
>>       if (operation == AMDGPU_VA_OP_MAP ||
>> -        operation == AMDGPU_VA_OP_REPLACE)
>> +        operation == AMDGPU_VA_OP_REPLACE) {
>>           r = amdgpu_vm_bo_update(adev, bo_va, false);
>> +        if (r)
>> +            goto error;
>> +    }
>>       r = amdgpu_vm_update_directories(adev, vm);
>> -    if (r)
>> -        goto error;
>>   error:
>>       if (r && r != -ERESTARTSYS)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ