From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: kunit: Add support for suppressing warning backtraces Date: Thu, 23 Apr 2026 09:52:25 +1000 Message-ID: In-Reply-To: <20260420-kunit_add_support-v7-0-e8bc6e0f70de@redhat.com> References: <20260420-kunit_add_support-v7-0-e8bc6e0f70de@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: kunit: Add support for suppressing warning backtraces Author: Albert Esteve Patches: 20 Reviewed: 2026-04-23T09:52:25.890322 --- This v7 series adds KUnit infrastructure for suppressing WARN() backtraces during tests that intentionally trigger them. The approach is sound: hooks are placed at two points in the warning path (`warn_slowpath_fmt()` for non-`__WARN_FLAGS` architectures, and `__report_bug()` for `__WARN_FLAGS` architectures), with an RCU-protected per-task suppression list. The design avoids touching `include/asm-generic/bug.h` and requires no architecture-specific code. The series is well-structured, has good test coverage, and addresses a real problem (noisy backtraces in CI from tests that intentionally pass bad parameters). **One significant correctness issue**: The RCU-protected `suppressed_warnings` list has no write-side lock. `list_add_rcu()` and `list_del_rcu()` are called without any mutual exclusion, which is incorrect per the RCU list API contract. While KUnit tests typically run sequentially, this is a latent data corruption bug if tests ever run concurrently. There is also a minor ordering issue in patch 2 where the atomic counter is incremented before `list_add_rcu()`, creating a window where `__kunit_is_suppressed_warning()` enters the RCU list traversal but doesn't find the entry yet. This is benign (returns false instead of true), but worth noting. Overall: good concept, near-mergeable, needs the write-side lock fix. --- --- Generated by Claude Code Patch Reviewer