[PATCH 1/2] drm/amdgpu: fix incorrect use of fcheck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The usage isn't RCU protected.

Signed-off-by: Christian König <christian.koenig at amd.com>
CC: stable at vger.kernel.org
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
 }
 
-- 
2.14.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux