diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1620-drm-amdgpu-remove-non-sense-NULL-ptr-check.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1620-drm-amdgpu-remove-non-sense-NULL-ptr-check.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1620-drm-amdgpu-remove-non-sense-NULL-ptr-check.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1620-drm-amdgpu-remove-non-sense-NULL-ptr-check.patch new file mode 100644 index 00000000..57c01302 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1620-drm-amdgpu-remove-non-sense-NULL-ptr-check.patch @@ -0,0 +1,48 @@ +From c4e63b8343df6a00998760b648268a3f2a2c0fda Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Thu, 10 Jan 2019 16:40:42 +0100 +Subject: [PATCH 1620/2940] drm/amdgpu: remove non-sense NULL ptr check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's a bug having a dead pointer in the IDR, silently returning +is the worst we can do. + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Chunming Zhou <david1.zhou@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 10 ---------- + 1 file changed, 10 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +index e87184670587..67c154c775b0 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +@@ -572,12 +572,6 @@ void amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr) + + mutex_lock(&mgr->lock); + idr_for_each_entry(idp, ctx, id) { +- +- if (!ctx->adev) { +- mutex_unlock(&mgr->lock); +- return; +- } +- + for (i = 0; i < num_entities; i++) { + struct drm_sched_entity *entity; + +@@ -598,10 +592,6 @@ void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr) + idp = &mgr->ctx_handles; + + idr_for_each_entry(idp, ctx, id) { +- +- if (!ctx->adev) +- return; +- + if (kref_read(&ctx->refcount) != 1) { + DRM_ERROR("ctx %p is still alive\n", ctx); + continue; +-- +2.17.1 + |