Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/userq: Use memdup_array_user in amdgpu_userq_signal_ioctl

Use the existing helper instead of multiplying the size.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tvrtko Ursulin and committed by
Alex Deucher
5eb2a72b fb1bf29a

+2 -2
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
··· 479 479 return -ENOTSUPP; 480 480 481 481 num_syncobj_handles = args->num_syncobj_handles; 482 - syncobj_handles = memdup_user(u64_to_user_ptr(args->syncobj_handles), 483 - size_mul(sizeof(u32), num_syncobj_handles)); 482 + syncobj_handles = memdup_array_user(u64_to_user_ptr(args->syncobj_handles), 483 + num_syncobj_handles, sizeof(u32)); 484 484 if (IS_ERR(syncobj_handles)) 485 485 return PTR_ERR(syncobj_handles); 486 486