From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380363; b=JASxAtLz4qgnP4SISPogafndCZhbtcPYK+AHk2/vD1Zh5YAXDjeZKVRU7QNzF4Ym1h1o 9zzakeePtQYzt/E2A1TGETnygDfGlIdKol5HBVMJFOOZrQKwJ1dyyhgrsqscAFFxIIaBb c9rRyf7wIHA93fvQVWd7jpgX4N/87pVErNDr93p00yZ4sXuHMzBzZ/xY6HPe/U7QVbT85 /z3EFQJZ+ae3jgThuc8KWQU4Mo4pCU6grVXhGcn+1MeBFAHFyHrQNF65UoRm9aByMyh5y STOrqOGpKyNQtLVaQYQO7SCe/cPqZt+fQ0vc6uFkIl37FexfvsrSrfS8OvU9tMkfTdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380363; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=NAGmhNLyGW/P0mnoaBjwwjFZCq1xTdGGG5wluNIcie0=; b=R14xkpHxV2XxHJQLgSq1x2OLhu306aQwBHHgy7cf9PzzYLMRMvc5p89qZpdV6GqcGbCg cXkrukzd284Nfp1UukoRPbut0WUE+KbgmkA0Woj5J6E5HALXOQP3eqmn7ozRtjVWm7ATI VZhO7xctkNQ71gyjM5/rOveZ0rmFQkBTeD3C5/WMNTVbQeLAxGXVXSmx+PBPdgQDb7atY 6u2gyr0Z+pQRg+zmLB6LD+soNKrlQOe53up/z4hDHtxAHBYDjDSrg95JJfoGu8FoU+y5p Srl/e1vBjD5OdtaHfyId1HNQYPCz4IXFn1XwXN+H5zNs7UFcBPV1aBg547GHexZlyhg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ZgefUG7e; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2272C606A322; Fri, 4 Dec 2026 10:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=ZgefUG7e Received: by smtp.kernel.org (Postfix) with ESMTPSA id 511C11F00936; Fri, 4 Dec 2026 10:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380362; bh=NAGmhNLyGW/P0mnoaBjwwjFZCq1xTdGGG5wluNIcie0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZgefUG7e3zXm3rSB7H0emdIU+rQg5MCl5WqeLUNMsNhCmNP1Rf1nNXaOlOnFpqPaD epc7vyLYY+X/hocNY6GNWkbDfbnruKE4qaaLsHzcRmAWog5E4G5j9ZpNxO8gw6tofL bmZkhWAJqpVPHwDpkyN3bL1GgSHHjDEHKh1Essxc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ian Forbes , =?UTF-8?q?Christian=20K=C3=B6nig?= , =?UTF-8?q?Micha=C5=82=20Grzelak?= , Dave Airlie , Rodrigo Vivi , Sasha Levin Subject: [PATCH 7.3 241/742] drm/ttm/tests: do not count pages after pools teardown Date: Fri, 4 Dec 2026 19:01:45 +0900 Message-ID: <20261204100641.472085358@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michał Grzelak [ Upstream commit cb9809483c7f08c8333833ecac11188e41bcc3c9 ] 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 Cc: Christian König Signed-off-by: Michał Grzelak Reviewed-by: Dave Airlie Link: https://patch.msgid.link/20261124004312.3880264-2-michal.grzelak@linux.intel.com Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin --- 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.53.0