From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Brost, Matthew" <matthew.brost@intel.com>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/xe: Fix NULL ptr dereference in devcoredump
Date: Thu, 30 May 2024 20:55:05 +0000 [thread overview]
Message-ID: <de4994c16b9ff9f8dc68d345f7172dc926ead396.camel@intel.com> (raw)
In-Reply-To: <20240530203341.1795181-1-matthew.brost@intel.com>
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@intel.com>
> 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;
next prev parent reply other threads:[~2024-05-30 20:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Souza, Jose [this message]
2024-05-30 21:18 ` ✓ CI.BAT: " Patchwork
2024-05-31 0:58 ` ✗ CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de4994c16b9ff9f8dc68d345f7172dc926ead396.camel@intel.com \
--to=jose.souza@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox