Re: [PATCH 2/3] kunit: fix NULL pointer dereference when filtering on module

From: Aveline Noir

Date: Fri Dec 04 2026 - 00:43:01 EST


Hi Tianzhong,

On Fri, 04 Dec 2026 10:57:21 +0800 Miao Tianzhong wrote:

> A test case that has no module_name (or a suite whose first test case
> has none) produces a NULL attribute value, and attr_string_filter()
> passes it to strcmp(), which dereferences NULL and panics the kernel.

The handshake tests and Rust KUnit tests both leave module_name NULL, so
booting with kunit.filter=module=<name> panics when they are built in.
Maybe worth mentioning in the commit message.

Tests passed on UML with both. Looks good to me.

Reviewed-by: Aveline Noir <jm5905938@xxxxxxxxx>
Tested-by: Aveline Noir <jm5905938@xxxxxxxxx>

Thanks,
Aveline Noir