Re: [PATCH] drm/amd/amdgpu: Fix up locking etc in amdgpu_debugfs_gprwave_ioctl()

2023-05-25 Thread Alex Deucher
Applied. Thanks! Alex On Thu, May 25, 2023 at 4:05 AM Dan Carpenter wrote: > > There are two bugs here. > 1) Drop the lock if copy_from_user() fails. > 2) If the copy fails then the correct error code is -EFAULT instead of >-EINVAL. > > I also broke up the long line and changed "sizeof rd->

[PATCH] drm/amd/amdgpu: Fix up locking etc in amdgpu_debugfs_gprwave_ioctl()

2023-05-25 Thread Dan Carpenter
There are two bugs here. 1) Drop the lock if copy_from_user() fails. 2) If the copy fails then the correct error code is -EFAULT instead of -EINVAL. I also broke up the long line and changed "sizeof rd->id" to "sizeof(rd->id)". Fixes: 164fb2940933 ("drm/amd/amdgpu: Update debugfs for XCC suppo