(snip)
#ifdef CONFIG_DEV_COREDUMP
tmp_adev->reset_context_vram_lost =
vram_lost;
tmp_adev->reset_context_task_info.pid = 0;
if (reset_context->job &&
reset_context->job->vm)
tmp_adev->reset_context_task_info =
reset_context->job->vm->task_info;
amdgpu_reset_capture_coredumpm(tmp_adev);
#endif
tmp_adev->reset_context_task_info refers to
reset_context->job->vm->task_info,
i am not setting PID and process name separately, instead i am having
the reference to the reset_context->job->vm->task_info on valid VM.
I think you are not getting my point. struct amdgpu_task_info has 3 more
parameters: process_name, task_name and tgid.
When VRAM is not lost: we are getting the whole new amdgpu_task_info
structure, and all parameters are valid.
When VRAM is lost: we should reset all parameters of amdgpu_task_info
structure, not just pid. Else other params may contain garbage.
So what I mean is:
instead of
tmp_adev->reset_context_task_info.pid = 0;
do something like:
memset(&tmp_adev->reset_context_task_info.pid, 0,
sizeof(reset_context_task_info));
- Shashank