From: Arnd Bergmann <arnd@arndb.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Kate Stewart <kstewart@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andi Kleen <ak@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] kernel debug: fix building without modules
Date: Fri, 3 Nov 2017 15:05:46 +0100 [thread overview]
Message-ID: <20171103140606.707333-1-arnd@arndb.de> (raw)
The new generic_bug_clear_once() function fails to build when
modules are disabled:
lib/bug.c: In function 'generic_bug_clear_once':
lib/bug.c:213:32: error: 'module_bug_list' undeclared (first use in this function); did you mean 'module_sig_ok'?
list_for_each_entry_rcu(mod, &module_bug_list, bug_list)
This adds another #ifdef around the code that resets the counters
in modules.
Fixes: 371435f78e9e ("kernel debug: support resetting WARN_ONCE for all architectures")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
lib/bug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/bug.c b/lib/bug.c
index fa9c901fabf4..c988a3fc3348 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -207,6 +207,7 @@ static void clear_once_table(struct bug_entry *start, struct bug_entry *end)
void generic_bug_clear_once(void)
{
+#ifdef CONFIG_MODULES
struct module *mod;
rcu_read_lock_sched();
@@ -214,6 +215,7 @@ void generic_bug_clear_once(void)
clear_once_table(mod->bug_table,
mod->bug_table + mod->num_bugs);
rcu_read_unlock_sched();
+#endif
clear_once_table(__start___bug_table, __stop___bug_table);
}
--
2.9.0
reply other threads:[~2017-11-03 14:06 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=20171103140606.707333-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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®