On Thu, 2024-05-30 at 13:33 -0700, Matthew Brost wrote: > Kernel VM do not have an Xe file. Include a check for Xe file in the VM > before trying to get pid from VM's Xe file when taking a devcoredump. > Reviewed-by: José Roberto de Souza <jose.souza@xxxxxxxxx> > Fixes: b10d0c5e9df7 ("drm/xe: Add process name to devcoredump") > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > Cc: José Roberto de Souza <jose.souza@xxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx > Signed-off-by: Matthew Brost <matthew.brost@xxxxxxxxx> > --- > drivers/gpu/drm/xe/xe_devcoredump.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c > index 1643d44f8bc4..6f63b8e4e3b9 100644 > --- a/drivers/gpu/drm/xe/xe_devcoredump.c > +++ b/drivers/gpu/drm/xe/xe_devcoredump.c > @@ -176,7 +176,7 @@ static void devcoredump_snapshot(struct xe_devcoredump *coredump, > ss->snapshot_time = ktime_get_real(); > ss->boot_time = ktime_get_boottime(); > > - if (q->vm) { > + if (q->vm && q->vm->xef) { > task = get_pid_task(q->vm->xef->drm->pid, PIDTYPE_PID); > if (task) > process_name = task->comm;