]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:47:15 +0000 (19:47 -0600)
BugLink: https://bugs.launchpad.net/bugs/1835972
commit bce31d4c1ae8865d6382e3a27b07b4bb8e020ade upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c

index 290cc3f9c433a3df7de41f1c1db228db30377ee8..8dcfc4124ea98160a6f493e1f8a2859186cb66a0 100644 (file)
@@ -53,7 +53,7 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
                                                  int fd,
                                                  enum amd_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;
 }