From: sashiko-bot@kernel.org
To: "Mukul Joshi" <mukul.joshi@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: reject errored peers in UALink local vPod integrity check
Date: Mon, 30 Nov 2026 17:33:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-241696@kernel.org> (raw)
In-Reply-To: <20261130171854.489910-2-mukul.joshi@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/amdgpu: errored vPod peers with invalid accel_id are
skipped
--
commit 51531015613e09183d21d8b32b3616673d7a007c
Author: Mukul Joshi <mukul.joshi@amd.com>
drm/amdgpu: reject errored peers in UALink local vPod integrity check
This commit updates __check_local_vpod_integrity() to explicitly handle
peers in AMDGPU_UALINK_ACCEL_STATE_ERROR by bounds-checking their
accel_id and failing the integrity check if they belong to the local vPod.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> index fa4c3d27d2720..8a1069feb27b9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> @@ -1179,6 +1179,17 @@ static int __check_local_vpod_integrity(struct amdgpu_device *adev)
> }
>
> accel_id = peer_info->ppod.accel_id;
> + /* An errored peer's accel_id may have failed validation. */
> + if (peer_info->accel_state == AMDGPU_UALINK_ACCEL_STATE_ERROR) {
> + if (accel_id < AMDGPU_UALINK_ACCEL_MAX &&
> + test_bit(accel_id, info->vpod.active_accel_bits)) {
> + dev_warn(adev->dev,
> + "UALINK: integrity fail: vpod peer accel_id=%u is in error state\n",
> + accel_id);
> + return -EINVAL;
> + }
> + continue;
> + }
> if (!test_bit(accel_id, info->vpod.active_accel_bits))
> continue;
> /* peer device vpod not configured */
[Severity: Medium]
Can an errored peer in the same vPod still be skipped here when its
peer_info->ppod.accel_id is invalid?
When a peer enters AMDGPU_UALINK_ACCEL_STATE_ERROR because
__check_ppod_info() failed in amdgpu_ualink_info_set_accel_state() (for
example, accel_id >= AMDGPU_UALINK_ACCEL_MAX or >= ppod.size) or because
__check_vpod_info() rejected a missing self-bit in active_accel_bits,
this condition is false and hits continue. Because
info->vpod.active_accel_bits includes both local and remote accelerators,
membership of a local GPU cannot be determined from an unvalidated
accel_id.
__check_local_vpod_integrity() then succeeds and activates the local vPod
despite the broken local peer, and the second loop still matches that
errored peer via __is_vpod_peer() (which only compares vpod.id and
ppod.id) and overwrites its n_local_accels and local_accels.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130171854.489910-2-mukul.joshi@amd.com?part=1
prev parent reply other threads:[~2026-11-30 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 17:18 [PATCHv2] drm/amdgpu: allow sparse UALink accelerator IDs in pPod validation Mukul Joshi
2026-11-30 17:18 ` [PATCH] drm/amdgpu: reject errored peers in UALink local vPod integrity check Mukul Joshi
2026-11-30 17:33 ` sashiko-bot [this message]
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-241696@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mukul.joshi@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox