Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Fix NULL ptr dereference in devcoredump
@ 2024-05-30 20:33 Matthew Brost
  2024-05-30 20:39 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Matthew Brost @ 2024-05-30 20:33 UTC (permalink / raw)
  To: intel-xe; +Cc: Matthew Brost, Rodrigo Vivi, José Roberto de Souza, stable

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>
---
 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-05-31  0:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 20:33 [PATCH] drm/xe: Fix NULL ptr dereference in devcoredump Matthew Brost
2024-05-30 20:39 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-30 20:39 ` ✓ CI.checkpatch: " Patchwork
2024-05-30 20:40 ` ✓ CI.KUnit: " Patchwork
2024-05-30 20:52 ` ✓ CI.Build: " Patchwork
2024-05-30 20:52 ` ✗ CI.Hooks: failure " Patchwork
2024-05-30 20:53 ` ✓ CI.checksparse: success " Patchwork
2024-05-30 20:55 ` [PATCH] " Souza, Jose
2024-05-30 21:18 ` ✓ CI.BAT: success for " Patchwork
2024-05-31  0:58 ` ✗ CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox