diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-17 19:36:08 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-21 14:19:10 -0500 |
commit | bce31d4c1ae8865d6382e3a27b07b4bb8e020ade (patch) | |
tree | 37fca7610a233092fa7ad5ec7ac605ae1797defb /drivers | |
parent | 11a88c2e92feca1ed3fba19fa375f76d3c75f5d5 (diff) | |
download | linux-bce31d4c1ae8865d6382e3a27b07b4bb8e020ade.tar.bz2 |
drm/amdgpu: fix incorrect use of fcheck
The usage isn't RCU protected.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index 86a0715d9431..cb62a90d0686 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -53,7 +53,7 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev, int fd, enum drm_sched_priority priority) { - struct file *filp = fcheck(fd); + struct file *filp = fget(fd); struct drm_file *file; struct pid *pid; struct amdgpu_fpriv *fpriv; @@ -78,6 +78,8 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev, put_pid(pid); + fput(filp); + return 0; } |