diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0930-drm-amdgpu-Fix-DEBUG_LOCKS_WARN_ON-depth-0-in-amdgpu.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/0930-drm-amdgpu-Fix-DEBUG_LOCKS_WARN_ON-depth-0-in-amdgpu.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0930-drm-amdgpu-Fix-DEBUG_LOCKS_WARN_ON-depth-0-in-amdgpu.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0930-drm-amdgpu-Fix-DEBUG_LOCKS_WARN_ON-depth-0-in-amdgpu.patch new file mode 100644 index 00000000..9d4a6b42 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0930-drm-amdgpu-Fix-DEBUG_LOCKS_WARN_ON-depth-0-in-amdgpu.patch @@ -0,0 +1,44 @@ +From d5e7c5c377e4a82fb75ecab9f5de7e972f091be6 Mon Sep 17 00:00:00 2001 +From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Date: Thu, 6 Dec 2018 15:51:37 -0500 +Subject: [PATCH 0930/2940] drm/amdgpu: Fix DEBUG_LOCKS_WARN_ON(depth <= 0) in + amdgpu_ctx.lock +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If CS is submitted using guilty ctx, we terminate amdgpu_cs_parser_init +before locking ctx->lock, latter in amdgpu_cs_parser_fini we still are +trying to release the lock just becase parser->ctx != NULL. + +Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> +Reviewed-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +index 0e382b1752f7..2bcd3d74de5d 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +@@ -126,14 +126,14 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs + goto free_chunk; + } + ++ mutex_lock(&p->ctx->lock); ++ + /* skip guilty context job */ + if (atomic_read(&p->ctx->guilty) == 1) { + ret = -ECANCELED; + goto free_chunk; + } + +- mutex_lock(&p->ctx->lock); +- + /* get chunks */ + chunk_array_user = u64_to_user_ptr(cs->in.chunks); + if (copy_from_user(chunk_array, chunk_array_user, +-- +2.17.1 + |