The patch below does not apply to the 6.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.10.y git checkout FETCH_HEAD git cherry-pick -x f2bf9e95989c0163650dbeaede658d0fcf929063 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2024081251-washhouse-liftoff-22e6@gregkh' --subject-prefix 'PATCH 6.10.y' HEAD^..
Possible dependencies:
f2bf9e95989c ("drm/xe: Fix NULL ptr dereference in devcoredump") b10d0c5e9df7 ("drm/xe: Add process name to devcoredump")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From f2bf9e95989c0163650dbeaede658d0fcf929063 Mon Sep 17 00:00:00 2001 From: Matthew Brost matthew.brost@intel.com Date: Thu, 30 May 2024 13:33:41 -0700 Subject: [PATCH] drm/xe: Fix NULL ptr dereference in devcoredump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
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.
Fixes: b10d0c5e9df7 ("drm/xe: Add process name to devcoredump") Cc: Rodrigo Vivi rodrigo.vivi@intel.com Cc: José Roberto de Souza jose.souza@intel.com Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost matthew.brost@intel.com Reviewed-by: José Roberto de Souza jose.souza@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20240530203341.1795181-1-matth...
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c index 1973bfaece40..d7f2d19a77c1 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;
linux-stable-mirror@lists.linaro.org