]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:35:23 +0000 (10:35 +0100)
commit3ebab463e9f42a186389e490bc199476db2a14d5
treeedfe703b06028589faab9b48308b66993ede795a
parent23da8e9ef69bc9af8f542edcf2123441edb45071
drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl

[ Upstream commit 1a701ea924815b0518733aa8d5d05c1f6fa87062 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c