]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: Replace kzalloc + copy_from_user with memdup_user
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 8 Sep 2025 21:31:56 +0000 (23:31 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Sep 2025 20:51:48 +0000 (16:51 -0400)
commit6156c101e5f082ee8911fbf0e112319d67403794
tree10e2d50a27ff358822abf383201cd3a71ca51e1e
parentd4b6274cbf0b0ee92294d699f138b63aa4796ad0
drm/amdkfd: Replace kzalloc + copy_from_user with memdup_user

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

Return early if an error occurs and remove the obsolete 'out' label.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c