From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm/xe/xe_drm_ras: Add error-event support in XE drm_ras
Date: Fri, 12 Jun 2026 05:22:25 +0000 [thread overview]
Message-ID: <20260612052225.7DB2F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260611052144.784969-6-riana.tauro@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Non-ratelimited `drm_err` in atomic context can cause console flood and soft lockups under memory pressure.
--
commit fadf160f443d10205c2dcc1f2b3421344e7bb067
Author: Riana Tauro <riana.tauro@intel.com>
drm/xe/xe_drm_ras: Add error-event support in XE drm_ras
This commit adds error-event support in the XE drm_ras subsystem. It notifies
userspace via netlink when a hardware error occurs, allowing tools to
subscribe to these events.
> diff --git a/drivers/gpu/drm/xe/xe_drm_ras.c b/drivers/gpu/drm/xe/xe_drm_ras.c
> index cd236f53699e0..09588e3fd984d 100644
> --- a/drivers/gpu/drm/xe/xe_drm_ras.c
> +++ b/drivers/gpu/drm/xe/xe_drm_ras.c
[ ... ]
> +void xe_drm_ras_event(struct xe_device *xe, u32 component, u32 severity, u32 value, gfp_t flags)
> +{
> + struct xe_drm_ras *ras = &xe->ras;
> + struct xe_drm_ras_counter *info = ras->info[severity];
> + struct drm_ras_node *node = &ras->node[severity];
> + int ret;
> +
> + if (!info || !info[component].name)
> + return;
> +
> + ret = drm_ras_nl_error_event(node, component, info[component].name, value, flags);
> + if (ret)
> + drm_err(&xe->drm, "RAS error-event failed: %d for %s %s\n", ret,
> + info[component].name, error_severity[severity]);
[Severity: Medium]
Could this un-ratelimited drm_err() cause console flooding and soft lockups
under memory pressure?
This function is called by hw_error_source_handler(), which iterates over
hardware errors while holding xe->irq.lock with interrupts disabled. Since
the netlink message allocation uses GFP_ATOMIC, it can fail repeatedly under
low memory conditions.
If an interrupt storm of hardware errors occurs, repeatedly printing to the
console from within a hard IRQ spinlock could heavily stall the CPU and
trigger RCU stalls or watchdogs.
Would it be safer to use drm_err_ratelimited() here, matching the behavior
of the other error logging in hw_error_source_handler()?
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260611052144.784969-4-riana.tauro@intel.com?part=2
next prev parent reply other threads:[~2026-06-12 5:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 5:21 [PATCH v2 0/2] Add drm_ras netlink error event support Riana Tauro
2026-06-11 5:21 ` [PATCH v2 1/2] drm/drm_ras: Add drm_ras netlink error event Riana Tauro
2026-06-12 5:22 ` sashiko-bot
2026-06-18 10:06 ` Raag Jadav
2026-06-11 5:21 ` [PATCH v2 2/2] drm/xe/xe_drm_ras: Add error-event support in XE drm_ras Riana Tauro
2026-06-12 5:22 ` sashiko-bot [this message]
2026-06-18 10:07 ` Raag Jadav
2026-06-11 5:29 ` ✓ CI.KUnit: success for Add drm_ras netlink error event support (rev2) Patchwork
2026-06-11 6:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-11 13:45 ` ✓ 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=20260612052225.7DB2F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=riana.tauro@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.