mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aveline Noir <jm5905938@gmail.com>
To: Miao Tianzhong <3514767322@qq.com>
Cc: brendan.higgins@linux.dev, david@davidgow.net,
	 kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org, raemoar63@gmail.com,
	 stable@vger.kernel.org
Subject: Re: [PATCH 2/3] kunit: fix NULL pointer dereference when filtering on module
Date: Fri, 04 Dec 2026 16:22:13 +1100	[thread overview]
Message-ID: <179636173387.93735.2443520067818924578.b4-reply@b4> (raw)
In-Reply-To: <tencent_20FF1E9282C0868E226A309E50F70F61D908@qq.com>

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@gmail.com>
Tested-by: Aveline Noir <jm5905938@gmail.com>

Thanks,
Aveline Noir

  reply	other threads:[~2026-12-04  5:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1796351229.git.3514767322@qq.com>
2026-12-04  2:57 ` [PATCH 1/3] kunit: fix filter attribute list parsing with a trailing comma Miao Tianzhong
2026-12-04  5:27   ` Aveline Noir
2026-12-04  2:57 ` [PATCH 2/3] kunit: fix NULL pointer dereference when filtering on module Miao Tianzhong
2026-12-04  5:22   ` Aveline Noir [this message]
2026-12-04  2:57 ` [PATCH 3/3] kunit: add tests for the test attribute API Miao Tianzhong
2026-12-04  5:32   ` Aveline Noir

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=179636173387.93735.2443520067818924578.b4-reply@b4 \
    --to=jm5905938@gmail.com \
    --cc=3514767322@qq.com \
    --cc=brendan.higgins@linux.dev \
    --cc=david@davidgow.net \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=raemoar63@gmail.com \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®