drm/amdgpu: fix incorrect use of drm_file->pid
That's the PID of the creator of the file (usually the X server) and not the end user of the file. 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
This commit is contained in:
parent
bce31d4c1a
commit
c4aed87630
@ -55,7 +55,6 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
|
|||||||
{
|
{
|
||||||
struct file *filp = fget(fd);
|
struct file *filp = fget(fd);
|
||||||
struct drm_file *file;
|
struct drm_file *file;
|
||||||
struct pid *pid;
|
|
||||||
struct amdgpu_fpriv *fpriv;
|
struct amdgpu_fpriv *fpriv;
|
||||||
struct amdgpu_ctx *ctx;
|
struct amdgpu_ctx *ctx;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
@ -63,20 +62,10 @@ static int amdgpu_sched_process_priority_override(struct amdgpu_device *adev,
|
|||||||
if (!filp)
|
if (!filp)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
pid = get_pid(((struct drm_file *)filp->private_data)->pid);
|
file = filp->private_data;
|
||||||
|
fpriv = file->driver_priv;
|
||||||
mutex_lock(&adev->ddev->filelist_mutex);
|
idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
|
||||||
list_for_each_entry(file, &adev->ddev->filelist, lhead) {
|
amdgpu_ctx_priority_override(ctx, priority);
|
||||||
if (file->pid != pid)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
fpriv = file->driver_priv;
|
|
||||||
idr_for_each_entry(&fpriv->ctx_mgr.ctx_handles, ctx, id)
|
|
||||||
amdgpu_ctx_priority_override(ctx, priority);
|
|
||||||
}
|
|
||||||
mutex_unlock(&adev->ddev->filelist_mutex);
|
|
||||||
|
|
||||||
put_pid(pid);
|
|
||||||
|
|
||||||
fput(filp);
|
fput(filp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user