drm/amdgpu: fix incorrect use of fcheck
authorChristian König <christian.koenig@amd.com>
Fri, 17 Aug 2018 17:36:08 +0000 (19:36 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Aug 2018 19:19:10 +0000 (14:19 -0500)
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
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c

index 86a0715..cb62a90 100644 (file)
@@ -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;
 }