From: sashiko-bot@kernel.org
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v5 4/4] drm/xe/ggtt: Add KUnit tests for usable and shareable pools
Date: Tue, 08 Sep 2026 10:27:57 +0000 [thread overview]
Message-ID: <20260908102757.BF1CD1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908100602.1626556-5-piotr.piorkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Test assertion aborts cause memory leaks and DRM MM teardown warnings in KUnit tests.
--
commit 0482b39a261e5a5e9244a46c2fbb33074c936fb0
Author: Piotr Piórkowski <piotr.piorkowski@intel.com>
drm/xe/ggtt: Add KUnit tests for usable and shareable pools
Add GGTT KUnit tests focused on the newly introduced usable and
shareable pools.
> diff --git a/drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c b/drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c
> new file mode 100644
> index 0000000000000..9bac48982a81b
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/tests/xe_ggtt_kunit.c
[ ... ]
> +static void alloc_usable_pool_oversized(struct kunit *test)
> +{
[ ... ]
> + node = xe_ggtt_insert_node(ggtt, usable + XE_PAGE_SIZE, XE_PAGE_SIZE);
> + KUNIT_ASSERT_TRUE(test, IS_ERR(node));
[Severity: Medium]
If the allocation unexpectedly succeeds in alloc_usable_pool_oversized(),
this assertion will fail and abort the test. Will the allocated node be leaked
and cause a warning from drm_mm_takedown() since it remains in the memory
manager?
[ ... ]
> +static void alloc_partial_overlap(struct kunit *test)
> +{
[ ... ]
> + usable_node = xe_ggtt_insert_node(ggtt, XE_PAGE_SIZE, XE_PAGE_SIZE);
> + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, usable_node);
> + shareable_node = xe_ggtt_insert_node_shareable(ggtt, XE_PAGE_SIZE, XE_PAGE_SIZE);
> + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, shareable_node);
[Severity: Medium]
If the allocation for shareable_node fails in alloc_partial_overlap(),
the assertion will abort the test. Does this leave usable_node in the memory
manager, leaking it and triggering a warning during DRM MM teardown?
[ ... ]
> +static void alloc_partial_overlap_usable_full(struct kunit *test)
> +{
[ ... ]
> + usable_node = xe_ggtt_insert_node(ggtt, usable, XE_PAGE_SIZE);
> + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, usable_node);
> + shareable_node = xe_ggtt_insert_node_shareable(ggtt, shareable, XE_PAGE_SIZE);
> + KUNIT_ASSERT_TRUE(test, IS_ERR(shareable_node));
[Severity: Medium]
If the shareable_node allocation unexpectedly succeeds here in
alloc_partial_overlap_usable_full(), the assertion will abort the test.
Could this cause usable_node to be leaked and trigger a drm_mm_takedown()
warning?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908100602.1626556-1-piotr.piorkowski@intel.com?part=4
next prev parent reply other threads:[~2026-09-08 10:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 10:05 [PATCH v5 0/4] Separate GGTT pools for submissions and VFs provisioning Piórkowski, Piotr
2026-09-08 10:05 ` [PATCH v5 1/4] drm/xe/ggtt: Introduce full GGTT range size Piórkowski, Piotr
2026-09-08 10:06 ` [PATCH v5 2/4] drm/xe/ggtt: Split GGTT into usable and shareable pools Piórkowski, Piotr
2026-09-08 10:06 ` [PATCH v5 3/4] drm/xe/ggtt: Initialize GGTT pools by SR-IOV mode Piórkowski, Piotr
2026-09-08 10:06 ` [PATCH v5 4/4] drm/xe/ggtt: Add KUnit tests for usable and shareable pools Piórkowski, Piotr
2026-09-08 10:27 ` sashiko-bot [this message]
2026-09-08 11:46 ` ✗ CI.checkpatch: warning for Separate GGTT pools for submissions and VFs provisioning (rev5) Patchwork
2026-09-08 11:48 ` ✓ CI.KUnit: success " Patchwork
2026-09-08 12:53 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-08 15:44 ` ✗ Xe.CI.FULL: 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=20260908102757.BF1CD1F00A3A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox