Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,stable@vger.kernel.org,linux@roeck-us.net,kees@kernel.org,david@davidgow.net,brendan.higgins@linux.dev,aesteve@redhat.com,acarmina@redhat.com,bartosz.golaszewski@oss.qualcomm.com,akpm@linux-foundation.org
Subject: + bug-fix-warning-suppressions-with-kunit-built-as-module.patch added to mm-hotfixes-unstable branch
Date: Wed, 08 Jul 2026 20:12:38 -0700	[thread overview]
Message-ID: <20260709031239.1AB911F000E9@smtp.kernel.org> (raw)


The patch titled
     Subject: bug: fix warning suppressions with kunit built as module
has been added to the -mm mm-hotfixes-unstable branch.  Its filename is
     bug-fix-warning-suppressions-with-kunit-built-as-module.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/bug-fix-warning-suppressions-with-kunit-built-as-module.patch

This patch will later appear in the mm-hotfixes-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: bug: fix warning suppressions with kunit built as module
Date: Wed, 8 Jul 2026 11:54:58 +0200

CONFIG_KUNIT is a tristate symbol but the warning suppression code in
lib/bug.c is only built if it's built-in due to it using a plain #ifdef,
rendering warning suppressions broken for kunit build as loadable module.

kunit_is_suppressed_warning() already has a stub for when kunit is
disabled so drop that guard entirely.

Link: https://lore.kernel.org/20260708095459.12111-1-bartosz.golaszewski@oss.qualcomm.com
Fixes: 85347718ab0d ("bug/kunit: Core support for suppressing warning backtraces")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Suggested-by: Albert Esteve <aesteve@redhat.com>
Reviewed-by: Albert Esteve <aesteve@redhat.com>
Reviewed-by: David Gow <david@davidgow.net>
Cc: Alessandro Carminati <acarmina@redhat.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: Guenetr Roeck <linux@roeck-us.net>
Cc: Kees Cook <kees@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/bug.c |    2 --
 1 file changed, 2 deletions(-)

--- a/lib/bug.c~bug-fix-warning-suppressions-with-kunit-built-as-module
+++ a/lib/bug.c
@@ -219,14 +219,12 @@ static enum bug_trap_type __report_bug(s
 	no_cut   = bug->flags & BUGFLAG_NO_CUT_HERE;
 	has_args = bug->flags & BUGFLAG_ARGS;
 
-#ifdef CONFIG_KUNIT
 	/*
 	 * Before the once logic so suppressed warnings do not consume
 	 * the single-fire budget of WARN_ON_ONCE().
 	 */
 	if (warning && kunit_is_suppressed_warning(true))
 		return BUG_TRAP_TYPE_WARN;
-#endif
 
 	disable_trace_on_warning();
 
_

Patches currently in -mm which might be from bartosz.golaszewski@oss.qualcomm.com are

bug-fix-warning-suppressions-with-kunit-built-as-module.patch


                 reply	other threads:[~2026-07-09  3:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260709031239.1AB911F000E9@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=acarmina@redhat.com \
    --cc=aesteve@redhat.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brendan.higgins@linux.dev \
    --cc=david@davidgow.net \
    --cc=kees@kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mm-commits@vger.kernel.org \
    --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