]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix potential double drop fence reference
authorPan Bian <bianpan2016@163.com>
Wed, 6 Nov 2019 09:14:45 +0000 (17:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Nov 2019 21:27:48 +0000 (16:27 -0500)
commit628d79664c392f189c70a2d2c14cff591aa31e7a
tree860770973362aa44ae5e12c67c85c3f87c160e92
parentd60779af9ac759a18a9a3c700b02cb3909b9272f
drm/amdgpu: fix potential double drop fence reference

The object fence is not set to NULL after its reference is dropped. As a
result, its reference may be dropped again if error occurs after that,
which may lead to a use after free bug. To avoid the issue, fence is
explicitly set to NULL after dropping its reference.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_test.c