drm/amdgpu: Replace kzalloc + copy_from_user with memdup_user

[ Upstream commit 99eeb8358e ]

Replace kzalloc() followed by copy_from_user() with memdup_user() to
improve and simplify ta_if_load_debugfs_write() and
ta_if_invoke_debugfs_write().

No functional changes intended.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: 480ad5f6ea ("drm/amdgpu: Fix locking bugs in error paths")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Thorsten Blum 2025-09-08 23:15:54 +02:00 • committed by Greg Kroah-Hartman
commit 3a9828141d