From: sashiko-bot@kernel.org
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 3/4] drm/xe/guc: Start use explicitly usable GuC IDs for for submission
Date: Thu, 27 Aug 2026 11:15:33 +0000 [thread overview]
Message-ID: <20260827111534.20BE51F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260827105750.1248792-4-piotr.piorkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Direct dereference of xe_device_get_gt() return value without a NULL check
--
commit 115f41f646ebc2f7ba925f4f7342a88fd5ea0b31
Author: Piotr Piórkowski <piotr.piorkowski@intel.com>
drm/xe/guc: Start use explicitly usable GuC IDs for for submission
This commit updates GuC submission to explicitly allocate context IDs from
the usable ID pool instead of assuming all IDs are available. It configures
the GuC ID manager according to the device operating mode by using dedicated
initialization paths for native, PF, and VF modes.
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 4286bd05c6861..14b12bcfaf548 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
[ ... ]
[Severity: High]
This is a pre-existing issue, but I noticed a potential NULL pointer
dereference during GuC initialization in guc_g2g_alloc():
drivers/gpu/drm/xe/xe_guc.c:guc_g2g_alloc() {
...
if (gt->info.id != 0) {
struct xe_gt *root_gt = xe_device_get_gt(xe, 0);
struct xe_guc *root_guc = &root_gt->uc.guc;
struct xe_bo *bo;
bo = xe_bo_get(root_guc->g2g.bo);
...
}
The subsystem guidelines state that xe_device_get_gt() can return NULL for
invalid GT indices and its result must always be checked. Here, the return
value is immediately used to calculate a pointer (&root_gt->uc.guc) and then
dereferenced to access root_guc->g2g.bo.
Could this lead to a memory corruption or crash if xe_device_get_gt() returns
NULL? If we specifically need the primary GT of the root tile, would it be
safer to use xe_root_mmio_gt() instead to avoid the NULL check requirement?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260827105750.1248792-1-piotr.piorkowski@intel.com?part=3
next prev parent reply other threads:[~2026-08-27 11:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 10:57 [PATCH v4 0/4] Split GuC ID space into usable and shareable pools Piórkowski, Piotr
2026-08-27 10:57 ` [PATCH v4 1/4] drm/xe/guc: Split GuC ID manager " Piórkowski, Piotr
2026-08-27 11:16 ` sashiko-bot
2026-09-25 11:29 ` K V P, Satyanarayana
2026-08-27 10:57 ` [PATCH v4 2/4] drm/xe/kunit: Extend GuC ID manager split-pool coverage Piórkowski, Piotr
2026-08-27 10:57 ` [PATCH v4 3/4] drm/xe/guc: Start use explicitly usable GuC IDs for for submission Piórkowski, Piotr
2026-08-27 11:15 ` sashiko-bot [this message]
2026-08-27 10:57 ` [PATCH v4 4/4] drm/xe/pf: Explicitly use shareable GuC IDs for VFs provisioning Piórkowski, Piotr
2026-09-25 11:42 ` K V P, Satyanarayana
2026-08-27 11:47 ` ✓ CI.KUnit: success for Split GuC ID space into usable and shareable pools (rev4) Patchwork
2026-08-27 12:26 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-27 13:36 ` ✓ Xe.CI.FULL: " 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=20260827111534.20BE51F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.