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: <a50e28c1-40ce-947f-21bf-1d9f32449adf@amd.com>
Date:   Mon, 24 Apr 2017 11:08:39 +0200
From:   Christian König <christian.koenig@....com>
To:     Pan Bian <bianpan201603@....com>,
        Alex Deucher <alexander.deucher@....com>,
        David Airlie <airlied@...ux.ie>
CC:     <amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>, Pan Bian <bianpan2016@....com>
Subject: Re: [PATCH 1/1] drm/radeon: check return value of radeon_fence_emit

Am 24.04.2017 um 10:45 schrieb Pan Bian:
> From: Pan Bian <bianpan2016@....com>
>
> Function radeon_fence_emit() returns -ENOMEM if there is no enough
> memory. And in this case, function radeon_ring_unlock_undo() rather than
> function radeon_ring_unlock_commit() should be called. However, in
> function radeon_test_create_and_emit_fence(), the return value of
> radeon_fence_emit() is ignored. This patch adds the check.
>
> Signed-off-by: Pan Bian <bianpan2016@....com>

Reviewed-by: Christian König <christian.koenig@....com>

> ---
>   drivers/gpu/drm/radeon/radeon_test.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c
> index 79181816..623768e 100644
> --- a/drivers/gpu/drm/radeon/radeon_test.c
> +++ b/drivers/gpu/drm/radeon/radeon_test.c
> @@ -298,7 +298,12 @@ static int radeon_test_create_and_emit_fence(struct radeon_device *rdev,
>   			DRM_ERROR("Failed to lock ring A %d\n", ring->idx);
>   			return r;
>   		}
> -		radeon_fence_emit(rdev, fence, ring->idx);
> +		r = radeon_fence_emit(rdev, fence, ring->idx);
> +		if (r) {
> +			DRM_ERROR("Failed to emit fence\n");
> +			radeon_ring_unlock_undo(rdev, ring);
> +			return r;
> +		}
>   		radeon_ring_unlock_commit(rdev, ring, false);
>   	}
>   	return 0;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ