]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 20 Aug 2019 13:39:53 +0000 (15:39 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Aug 2019 22:32:39 +0000 (17:32 -0500)
commit2c55f37ba5fb45e189db47c5c1748aa6a56848d4
tree7663c0d9ae8e170b832e1928f885a0261800eb3c
parentf7ca666d3ccf6a774656db4249edfb3645c8b54a
drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl

Error out if the AMDGPU_CS ioctl is called with multiple SYNCOBJ_OUT and/or
TIMELINE_SIGNAL chunks, since otherwise the last chunk wins while the
allocated array as well as the reference counts of sync objects are leaked.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@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