All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Grzelak" <michal.grzelak@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org,
	"Ian Forbes" <ian.forbes@broadcom.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Michał Grzelak" <michal.grzelak@intel.com>,
	"Michał Grzelak" <michal.grzelak@linux.intel.com>
Subject: [PATCH v1 1/1] drm/ttm/tests: do not count pages after pool's teardown
Date: Tue, 24 Nov 2026 01:43:12 +0100	[thread overview]
Message-ID: <20261124004312.3880264-2-michal.grzelak@linux.intel.com> (raw)
In-Reply-To: <20261124004312.3880264-1-michal.grzelak@linux.intel.com>

Currently ttm_pool_fini_basic() checks if page count of pool-type's lru
list is zero after tearing down its pre-populated pool.

After commit 5ffdc8f83613 ("ttm/pool: Don't leak LRU list on shutdown")
this check causes NULL dereference because page's lru list is destroyed
during pool's teardown which leads to KUnit's crash:

[20:08:24] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[20:08:24] [PASSED] ttm_pool_alloc_order_caching_match
[20:08:24] [PASSED] ttm_pool_alloc_caching_mismatch
[20:08:24] [PASSED] ttm_pool_alloc_order_mismatch
[20:08:24] [PASSED] ttm_pool_free_dma_alloc
[20:08:24] [PASSED] ttm_pool_free_no_dma_alloc
[20:08:25] [ERROR] Test: ttm_pool: missing expected subtest!
[20:08:25]
[20:08:25] Pid: 80, comm: kunit_try_catch Tainted: G        W        N  7.4.0-rc4-g401a3e7b64d1
[20:08:25] RIP: 0033:list_lru_count_node+0xe/0x20
[20:08:25] RSP: 00000000a08dbef8  EFLAGS: 00010246
[20:08:25] RAX: 0000000000000001 RBX: 00000000a0803c70 RCX: 0000000000000020
[20:08:25] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000060853030
[20:08:25] RBP: 0000000060853000 R08: 00000000a08dbe98 R09: 00000000601246ac
[20:08:25] R10: 000000009f227d00 R11: 0000000000000000 R12: 0000000060124640
[20:08:25] R13: 0000000060853030 R14: 000000006047c950 R15: 00000000604c6488
[20:08:25] Kernel panic - not syncing: Segfault with no mm
[20:08:25] [CRASHED]
[20:08:25] [ERROR] Test: ttm_pool: missing subtest result line!
[20:08:25] # module: ttm_pool_test
[20:08:25] ==================== [CRASHED] ttm_pool ====================
[20:08:25] [ERROR] Test: main: missing expected subtest!
[20:08:25] [CRASHED]
[20:08:25] [ERROR] Test: main: missing expected subtest!
[20:08:25] [CRASHED]
[20:08:25] [ERROR] Test: main: missing expected subtest!
[20:08:25] [CRASHED]
[20:08:25] [ERROR] Test: main: missing expected subtest!
[20:08:25] [CRASHED]
[20:08:25] ============================================================
[20:08:25] Testing complete. Ran 28 tests: passed: 23, crashed: 5, errors: 6

The crash in turn prevents Xe CI from running IGT.

Drop the post-teardown assertion.

Fixes: 5ffdc8f83613 ("ttm/pool: Don't leak LRU list on shutdown")
Cc: Ian Forbes <ian.forbes@broadcom.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Michał Grzelak <michal.grzelak@linux.intel.com>
---
 drivers/gpu/drm/ttm/tests/ttm_pool_test.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c b/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
index be75c8abf3883..dab03dd6c9dd7 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_pool_test.c
@@ -401,8 +401,6 @@ static void ttm_pool_fini_basic(struct kunit *test)
 	KUNIT_ASSERT_FALSE(test, !list_lru_count(&pt->pages));
 
 	ttm_pool_fini(pool);
-
-	KUNIT_ASSERT_TRUE(test, !list_lru_count(&pt->pages));
 }
 
 static struct kunit_case ttm_pool_test_cases[] = {
-- 
2.45.2


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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  0:43 [PATCH v1 0/1] drm/ttm/tests: unblock Xe CI runs Michał Grzelak
2026-11-24  0:43 ` Michał Grzelak [this message]
2026-11-24  1:41   ` [PATCH v1 1/1] drm/ttm/tests: do not count pages after pool's teardown Dave Airlie
2026-11-24  8:15     ` Michał Grzelak
2026-11-24 15:29       ` Rodrigo Vivi
2026-11-24  9:25   ` Christian König
2026-11-24  0:57 ` ✗ CI.checkpatch: warning for drm/ttm/tests: unblock Xe CI runs Patchwork
2026-11-24  0:59 ` ✓ CI.KUnit: success " Patchwork
2026-11-24  1:37 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-24  2:55 ` ✓ 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=20261124004312.3880264-2-michal.grzelak@linux.intel.com \
    --to=michal.grzelak@linux.intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ian.forbes@broadcom.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.grzelak@intel.com \
    /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.