All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michael J. Ruhl" <michael.j.ruhl@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v22 14/19] drm/xe/vsec: Crescent Island PMT callbacks
Date: Tue, 24 Nov 2026 00:51:54 +0000	[thread overview]
Message-ID: <sashiko-outbox-230317@kernel.org> (raw)
In-Reply-To: <20261124003856.4145635-35-michael.j.ruhl@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/xe/vsec: missing drm_dev_exit() on error in
  xe_pmt_discovery_read()
--

commit 8c8761ddca798aa5d26ec62fcb0ab2b48dec6b52
Author: Michael J. Ruhl <michael.j.ruhl@intel.com>

drm/xe/vsec: Crescent Island PMT callbacks

This commit introduces PMT discovery, register read/write, and telemetry
callbacks for Crescent Island (CRI) and registers CRI PMT functionality
during VSEC initialization.

> diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c
> index a814d7151eeae..188eaf13d68ff 100644
> --- a/drivers/gpu/drm/xe/xe_vsec.c
> +++ b/drivers/gpu/drm/xe/xe_vsec.c
[ ... ]
> @@ -358,20 +364,184 @@ int xe_pmt_telem_read(struct device *dev, u32 guid, u64 *data, loff_t user_offse
>  	return ret == 0 ? count : ret;
>  }
>  
> -static struct pmt_callbacks xe_pmt_cb = {
[ ... ]
> +static int xe_pmt_discovery_read(struct device *dev, unsigned long cap_id, u32 element,
> +				 u32 *disc_data)
> +{
> +	struct xe_device *xe = kdev_to_xe_device(dev);
> +	void __iomem *disc_addr = xe->mmio.regs;
> +	struct intel_vsec_header *headers;
> +	int ret = 0;
> +	u32 offset;
> +	int idx;
> +
> +	if (!drm_dev_enter(&xe->drm, &idx))
> +		return -ENODEV;
> +
> +	if (!xe_pm_runtime_get_if_active(xe))
> +		return -ENODATA;
[ ... ]
> +dev_exit:
> +	xe_pm_runtime_put(xe);
> +	drm_dev_exit(idx);
> +
> +	return ret;
> +}

[Severity: High]
Does this leak the drm_unplug_srcu read lock acquired by drm_dev_enter()
when xe_pm_runtime_get_if_active() returns false?  Returning -ENODATA
without calling drm_dev_exit(idx) leaves the SRCU read lock held, which
triggers a lockdep warning on return to userspace and causes any later
drm_dev_unplug() to hang in synchronize_srcu().  Note that jumping to
dev_exit would also call an unbalanced xe_pm_runtime_put(xe).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124003856.4145635-21-michael.j.ruhl@intel.com?part=14

  reply	other threads:[~2026-11-24  0:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  0:38 [PATCH v22 00/19] Crescent Island PMT support Michael J. Ruhl
2026-11-24  0:38 ` [PATCH v22 01/19] platform/x86/intel/pmt: Introduce a callback for discovery data Michael J. Ruhl
2026-11-24  0:38 ` [PATCH v22 02/19] platform/x86/intel/pmt: Use the pre-populated header info for crashlog Michael J. Ruhl
2026-11-24  0:38 ` [PATCH v22 03/19] drm/xe/vsec: VSEC requires soc-remapper Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 04/19] drm/xe/vsec: Do not register BMG PMT for VF Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 05/19] drm/xe/vsec: Correct locking order Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 06/19] drm/xe/vsec: Use correct pm state get Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 07/19] drm/xe/vsec: Add DOC text for VSEC Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 08/19] drm/xe/vsec: Support possible hotplug exit Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 09/19] drm/xe/vsec: Refactor BattleMage PMT defines Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 10/19] drm/xe/vsec: Update VSEC probe order Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 11/19] drm/xe/vsec: Add base_offset to allow for more flexibilty Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 12/19] drm/xe/vsec: Support Crescent Island PMT Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 13/19] drm/xe/vsec: Crescent Island PMT decode Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 14/19] drm/xe/vsec: Crescent Island PMT callbacks Michael J. Ruhl
2026-11-24  0:51   ` sashiko-bot [this message]
2026-11-24  0:39 ` [PATCH v22 15/19] drm/xe/vsec: Support late bind fw information Michael J. Ruhl
2026-11-24  1:00   ` sashiko-bot
2026-11-24  0:39 ` [PATCH v22 16/19] drm/xe/vsec: Add PMT GUID internal access Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 17/19] drm/xe/vsec: Update PMT " Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 18/19] drm/xe/vsec: Refactor platform check Michael J. Ruhl
2026-11-24  0:39 ` [PATCH v22 19/19] drm/xe/vsec: Support survivability mode for CRI Michael J. Ruhl
2026-11-24  0:54   ` sashiko-bot
2026-11-24  0:48 ` ✗ CI.checkpatch: warning for Crescent Island PMT support (rev23) Patchwork
2026-11-24  0:49 ` ✗ CI.KUnit: 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=sashiko-outbox-230317@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michael.j.ruhl@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.