From: "tip-bot2 for Heiko Carstens" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Heiko Carstens <hca@linux.ibm.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: core/urgent] bug: Let report_bug_entry() provide the correct bugaddr
Date: Fri, 12 Dec 2025 09:29:10 -0000 [thread overview]
Message-ID: <176553175010.498.7313411575172995122.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20251208200658.3431511-1-hca@linux.ibm.com>
The following commit has been merged into the core/urgent branch of tip:
Commit-ID: b5e51ef787660bffe9cd059e7abe32f3b1667a98
Gitweb: https://git.kernel.org/tip/b5e51ef787660bffe9cd059e7abe32f3b1667a98
Author: Heiko Carstens <hca@linux.ibm.com>
AuthorDate: Mon, 08 Dec 2025 21:06:58 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 12 Dec 2025 10:26:13 +01:00
bug: Let report_bug_entry() provide the correct bugaddr
report_bug_entry() always provides zero for bugaddr but could easily
extract the correct address from the provided bug_entry. Just do that to
have proper warning messages.
E.g. adding an artificial:
void foo(void) { WARN_ONCE(1, "bar"); }
function generates this warning message:
WARNING: arch/s390/kernel/setup.c:1017 at 0x0, CPU#0: swapper/0/0
^^^
With the correct bug address this changes to:
WARNING: arch/s390/kernel/setup.c:1017 at foo+0x1c/0x40, CPU#0: swapper/0/0
^^^^^^^^^^^^^
Fixes: 7d2c27a0ec5e ("bug: Add report_bug_entry()")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20251208200658.3431511-1-hca@linux.ibm.com
---
lib/bug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bug.c b/lib/bug.c
index edd9041..c6f691f 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -262,7 +262,7 @@ enum bug_trap_type report_bug_entry(struct bug_entry *bug, struct pt_regs *regs)
bool rcu = false;
rcu = warn_rcu_enter();
- ret = __report_bug(bug, 0, regs);
+ ret = __report_bug(bug, bug_addr(bug), regs);
warn_rcu_exit(rcu);
return ret;
prev parent reply other threads:[~2025-12-12 9:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 20:06 [PATCH] bug: Let report_but_entry() " Heiko Carstens
2025-12-08 20:27 ` Peter Zijlstra
2025-12-09 9:17 ` [tip: core/urgent] " tip-bot2 for Heiko Carstens
2025-12-12 9:10 ` tip-bot2 for Heiko Carstens
2025-12-12 9:29 ` tip-bot2 for Heiko Carstens [this message]
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=176553175010.498.7313411575172995122.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@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®