drm/amdgpu: Fix DEBUG_LOCKS_WARN_ON(depth <= 0) in amdgpu_ctx.lock
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Thu, 6 Dec 2018 20:51:37 +0000 (15:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Dec 2018 16:16:14 +0000 (11:16 -0500)
commitc554206077428af56cc2e0314b86b41cd030458c
tree15f33e0d7d60c89de5508ff515acd3807a113ac5
parentcf4197ed5796234a53beb71228198c7d1e678947
drm/amdgpu: Fix DEBUG_LOCKS_WARN_ON(depth <= 0) in amdgpu_ctx.lock

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