From 90c94250217113feede38997d827dbd073be5799 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 27 Jan 2022 02:56:13 +0000 Subject: [PATCH] use process name for both thread and process name --- sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c index f6f28740def..638e11652e6 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm.c @@ -3419,9 +3419,15 @@ void amdgpu_vm_set_task_info(struct amdgpu_vm *vm) vm->task_info.tgid = current->group_leader->pid; get_task_comm(vm->task_info.process_name, current->group_leader); #else - vm->task_info.pid = curproc->p_p->ps_pid; + /* thread */ + vm->task_info.pid = curproc->p_tid; strlcpy(vm->task_info.task_name, curproc->p_p->ps_comm, sizeof(vm->task_info.task_name)); + + /* process */ + vm->task_info.tgid = curproc->p_p->ps_pid; + strlcpy(vm->task_info.process_name, curproc->p_p->ps_comm, + sizeof(vm->task_info.process_name)); #endif } -- 2.20.1