From: Aaron Tomlin <atomlin@redhat.com>
To: Petr Pavlu <petr.pavlu@suse.com>
Cc: mcgrof@kernel.org, christophe.leroy@csgroup.eu,
linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org,
atomlin@atomlin.com
Subject: Re: [PATCH modules-next] module: Add debugfs interface to view unloaded tainted modules
Date: Wed, 31 Aug 2022 11:19:07 +0100 [thread overview]
Message-ID: <20220831101907.5rqz6ylj2dyojqnj@ava.usersys.com> (raw)
In-Reply-To: <2bf2b4ee-fd8d-962d-0daa-9c8093ad331e@suse.com>
On Mon 2022-08-29 09:14 +0200, Petr Pavlu wrote:
> On 8/23/22 21:32, Aaron Tomlin wrote:
> > [...]
> > @@ -59,3 +60,68 @@ void print_unloaded_tainted_modules(void)
> > }
> > }
> > }
> > +
> > +#ifdef CONFIG_DEBUG_FS
> > +static void *unloaded_tainted_modules_seq_start(struct seq_file *m, loff_t *pos)
> > +{
> > + mutex_lock(&module_mutex);
> > + return seq_list_start_rcu(&unloaded_tainted_modules, *pos);
> > +}
Hi Petr,
> unloaded_tainted_modules looks to be a proper RCU list which makes me think
> this reader could use just rcu_read_lock() instead of
> mutex_lock(&module_mutex)?
If I understand correctly, yes: the use of rcu_read_lock() and
rcu_read_unlock(), respectively, will be sufficient.
I will send a follow up patch.
Kind regards,
--
Aaron Tomlin
prev parent reply other threads:[~2022-08-31 10:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 19:32 [PATCH modules-next] module: Add debugfs interface to view unloaded tainted modules Aaron Tomlin
2022-08-29 7:14 ` Petr Pavlu
2022-08-31 10:19 ` 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=20220831101907.5rqz6ylj2dyojqnj@ava.usersys.com \
--to=atomlin@redhat.com \
--cc=atomlin@atomlin.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).