summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-08-17 19:36:08 +0200
committerAlex Deucher <alexander.deucher@amd.com>2018-08-21 14:19:10 -0500
commitbce31d4c1ae8865d6382e3a27b07b4bb8e020ade (patch)
tree37fca7610a233092fa7ad5ec7ac605ae1797defb
parent11a88c2e92feca1ed3fba19fa375f76d3c75f5d5 (diff)
downloadlinux-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
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c4
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;
}