From: Aaron Tomlin <atomlin@redhat.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: mcgrof@kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org
Subject: Re: "Unloaded tainted modules:" prints repeated wrong value
Date: Thu, 6 Oct 2022 17:38:09 +0100 [thread overview]
Message-ID: <20221006163809.6gzl23ylu36gerli@ava.usersys.com> (raw)
In-Reply-To: <YzwraXZ3J0p7lch2@localhost.localdomain>
On Tue 2022-10-04 15:47 +0300, Alexey Dobriyan wrote:
> I got obiously incorrect values of "pcc_cpufreq():1" on a clean kernel
> and clean oops (see below). Original oops is different bug.
Hi Alexey,
[Added Luis Chamberlain and linux-modules@vger.kernel.org on Cc]
Sorry about that!
Indeed, in the context of the module deletion code path, no module
record/or entry should be added to 'unloaded_tainted_modules' if
the module does not carry a taint. I will send a patch shortly.
The following solution should be sufficient:
diff --git a/kernel/module/tracking.c b/kernel/module/tracking.c
index 7f8133044d09..af52cabfe632 100644
--- a/kernel/module/tracking.c
+++ b/kernel/module/tracking.c
@@ -21,6 +21,9 @@ int try_add_tainted_module(struct module *mod)
module_assert_mutex_or_preempt();
+ if (!mod->taints)
+ goto out;
+
list_for_each_entry_rcu(mod_taint, &unloaded_tainted_modules, list,
lockdep_is_held(&module_mutex)) {
if (!strcmp(mod_taint->name, mod->name) &&
Kind regards,
--
Aaron Tomlin
prev parent reply other threads:[~2022-10-06 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 12:47 Alexey Dobriyan
2022-10-06 16:38 ` Aaron Tomlin [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=20221006163809.6gzl23ylu36gerli@ava.usersys.com \
--to=atomlin@redhat.com \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@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®