On Fri, Feb 20, 2026 at 8:44 AM Khatri, Sunil <[email protected]> wrote:
>
> Can you please get these two changes merged please,

@Sunil Khatri go ahead and push these to ASDN.

Alex

>
> Regards
> Sunil Khatri
>
> On 20-02-2026 07:01 pm, Khatri, Sunil wrote:
> > Please make sure the changes are made for all memdup_user
> > Reviewed-by: Sunil Khatri <[email protected]>
> >
> > On 05-12-2025 07:10 pm, Tvrtko Ursulin wrote:
> >> Use the existing helper instead of multiplying the size.
> >>
> >> Signed-off-by: Tvrtko Ursulin <[email protected]>
> >> ---
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 12 ++++++------
> >>   1 file changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> >> index 7aa26e88c8ec..f979e896c714 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
> >> @@ -618,21 +618,21 @@ int amdgpu_userq_wait_ioctl(struct drm_device
> >> *dev, void *data,
> >>       int r, i, cnt;
> >>         num_syncobj = wait_info->num_syncobj_handles;
> >> -    syncobj_handles =
> >> memdup_user(u64_to_user_ptr(wait_info->syncobj_handles),
> >> -                      size_mul(sizeof(u32), num_syncobj));
> >> +    syncobj_handles =
> >> memdup_array_user(u64_to_user_ptr(wait_info->syncobj_handles),
> >> +                        num_syncobj, sizeof(u32));
> >>       if (IS_ERR(syncobj_handles))
> >>           return PTR_ERR(syncobj_handles);
> >>         num_points = wait_info->num_syncobj_timeline_handles;
> >> -    timeline_handles =
> >> memdup_user(u64_to_user_ptr(wait_info->syncobj_timeline_handles),
> >> -                       sizeof(u32) * num_points);
> >> +    timeline_handles =
> >> memdup_array_user(u64_to_user_ptr(wait_info->syncobj_timeline_handles),
> >> +                         num_points, sizeof(u32));
> >>       if (IS_ERR(timeline_handles)) {
> >>           r = PTR_ERR(timeline_handles);
> >>           goto free_syncobj_handles;
> >>       }
> >>   -    timeline_points =
> >> memdup_user(u64_to_user_ptr(wait_info->syncobj_timeline_points),
> >> -                      sizeof(u32) * num_points);
> >> +    timeline_points =
> >> memdup_array_user(u64_to_user_ptr(wait_info->syncobj_timeline_points),
> >> +                        num_points, sizeof(u32));
> >>       if (IS_ERR(timeline_points)) {
> >>           r = PTR_ERR(timeline_points);
> >>           goto free_timeline_handles;

Reply via email to