From: sashiko-bot@kernel.org
To: "Mario Limonciello" <mario.limonciello@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 3/3] drm/amdgpu: release WC memtype and MTRR when amdgpu_bo_init() fails
Date: Wed, 18 Nov 2026 19:09:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-221823@kernel.org> (raw)
In-Reply-To: <20261118-superm1-amdgpu-memory-leak-v2-3-38365f37bd5a@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/amdgpu: missing Fixes trailer for amdgpu_bo_init() leak fix
--
commit b39bca7df25d1f904ab6219bf84105076d42ff05
Author: Mario Limonciello <mario.limonciello@amd.com>
> drm/amdgpu: release WC memtype and MTRR when amdgpu_bo_init() fails
>
> amdgpu_bo_init() reserves the WC memtype for the VRAM aperture and adds
> an MTRR before calling amdgpu_ttm_init(). If amdgpu_ttm_init() fails,
> the GMC sw_init callers just return the error and GMC's sw_fini is never
> run, so amdgpu_bo_fini(), the only place that drops the memtype and MTRR,
> is never called. A later rebind then reserves the same aperture again
> with the old reservation still held.
>
> Undo the memtype reservation and the MTRR in amdgpu_bo_init() itself when
> amdgpu_ttm_init() fails.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
[Severity: Low]
Should this bug fix include Fixes tags for the commits that introduced the
MTRR and WC memtype reservations in amdgpu_bo_init() without unwinding
them on failure?
Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
Fixes: 7cf321d118a8 ("drm/drivers: add support for using the arch wc mapping API.")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118-superm1-amdgpu-memory-leak-v2-0-38365f37bd5a@amd.com?part=3
prev parent reply other threads:[~2026-11-18 19:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 19:02 [PATCH v2 0/3] fix TTM device_list use-after-free on failed probe Mario Limonciello
2026-11-18 19:02 ` [PATCH v2 1/3] drm/amdgpu: unwind TTM on amdgpu_ttm_init() failure Mario Limonciello
2026-11-18 19:03 ` [PATCH v2 2/3] drm/amdgpu: unwind bo_init on GMC sw_init failure Mario Limonciello
2026-11-18 19:03 ` [PATCH v2 3/3] drm/amdgpu: release WC memtype and MTRR when amdgpu_bo_init() fails Mario Limonciello
2026-11-18 19:09 ` 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-221823@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=mario.limonciello@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