Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: don't abuse current->group_leader

Cleanup and preparation to simplify the next changes.

- Use current->tgid instead of current->group_leader->pid

- Use get_task_pid(current, PIDTYPE_TGID) instead of
get_task_pid(current->group_leader, PIDTYPE_PID)

Link: https://lkml.kernel.org/r/aXY_wKewzV5lCa5I@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Christan König <christian.koenig@amd.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Oleg Nesterov and committed by
Andrew Morton
7d08e091 a170919d

+2 -2
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
··· 1421 1421 goto create_evict_fence_fail; 1422 1422 } 1423 1423 1424 - info->pid = get_task_pid(current->group_leader, PIDTYPE_PID); 1424 + info->pid = get_task_pid(current, PIDTYPE_TGID); 1425 1425 INIT_DELAYED_WORK(&info->restore_userptr_work, 1426 1426 amdgpu_amdkfd_restore_userptr_worker); 1427 1427
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 2554 2554 if (current->group_leader->mm != current->mm) 2555 2555 return; 2556 2556 2557 - vm->task_info->tgid = current->group_leader->pid; 2557 + vm->task_info->tgid = current->tgid; 2558 2558 get_task_comm(vm->task_info->process_name, current->group_leader); 2559 2559 } 2560 2560