Hi Linus, Please pull this kunit fixes update for Linux 7.1-rc6. Fixes use-after-free in kunit debugfs when using kunit.filter when the executor frees dynamically allocated resources after running boot-time tests. This resulted in fatal hardware exception due to invalidation of capability flags on the reclaimed memory on some architectures such as CHERI RISC-V that support the feature, and silent memory corruption on others. Fix for this UAF couples the coupling the lifetime of the filtered suite memory allocation to the lifetime of the kunit subsystem and its associated VFS nodes. Ownership of the boot-time suite_set is now transferred to a global tracker ('kunit_boot_suites'), and the memory is cleanly released in kunit_exit() during module teardown. diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit 8f80b5b227ef9ea422080487715c841856339aed: kunit: config: KUNIT_DEBUGFS should depend on DEBUG_FS (2026-05-04 12:10:40 -0600) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-fixes-7.1-rc6 for you to fetch changes up to fb6988b83b4cafe8db63999c1ddff1b7c66d2ff5: kunit: fix use-after-free in debugfs when using kunit.filter (2026-05-21 10:45:49 -0600) ---------------------------------------------------------------- linux_kselftest-kunit-fixes-7.1-rc6 Fixes use-after-free in kunit debugfs when using kunit.filter when the executor frees dynamically allocated resources after running boot-time tests. This resulted in fatal hardware exception due to invalidation of capability flags on the reclaimed memory on some architectures such as CHERI RISC-V that support the feature, and silent memory corruption on others. Fix for this UAF couples the coupling the lifetime of the filtered suite memory allocation to the lifetime of the kunit subsystem and its associated VFS nodes. Ownership of the boot-time suite_set is now transferred to a global tracker ('kunit_boot_suites'), and the memory is cleanly released in kunit_exit() during module teardown. ---------------------------------------------------------------- Florian Schmaus (1): kunit: fix use-after-free in debugfs when using kunit.filter include/kunit/test.h | 1 + lib/kunit/executor.c | 19 ++++++++++++++++--- lib/kunit/test.c | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) ----------------------------------------------------------------