From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
jmorris@namei.org, serge@hallyn.com,
linux-integrity@vger.kernel.org,
Matthew Garrett <mjg59@google.com>
Subject: Re: Fwd: a8d5875ce5 ("Default enable RCU list lockdep debugging with .."): WARNING: suspicious RCU usage
Date: Thu, 30 Apr 2020 20:38:57 +0530 [thread overview]
Message-ID: <20200430150857.GA30198@madhuparna-HP-Notebook> (raw)
In-Reply-To: <1588253550.5167.26.camel@linux.ibm.com>
On Thu, Apr 30, 2020 at 09:32:30AM -0400, Mimi Zohar wrote:
> On Thu, 2020-04-30 at 18:37 +0530, Madhuparna Bhowmik wrote:
> > On Wed, Apr 29, 2020 at 03:40:58PM -0700, Paul E. McKenney wrote:
> > > You do of course need the code to use the RCU variants of list_add*().
> > > And also list_for_each_entry_rcu(), as in the current code.
> > >
> > > There are several options, none of them perfect:
> > >
> > > 1. Add (not otherwise needed) calls to rcu_read_lock() and
> > > rcu_read_unlock() and leave list_for_each_entry_rcu() unchanged.
> > >
> > > 2. Add "true" for the optional fourth argument to
> > > list_for_each_entry_rcu(). This will suppress the complaints,
> > > but would (incorrectly) continue to do so should this code change
> > > so as to be able to delete form this list.
> > >
> > > 3. Switch from list_for_each_entry_rcu() to its lockless counterpart,
> > > list_for_each_entry_lockless(). This is simiar to #2 above, but
> > > at least the name lets people know that something unusual is up.
> > >
> > > If it was my code, I would take door #3. ;-)
> > >
> > Thanks a lot for your inputs on this. I will send a patch soon.
>
> Please remember to expand the "mutex" comment in evm_write_xattrs() to
> reflect the reason why using list_for_each_entry_lockless() is safe.
>
Sure.
Thank you,
Madhuparna
>
> Mimi
prev parent reply other threads:[~2020-04-30 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5ea3a0e3.ruR9Zw9VIGN+NGIb%lkp@intel.com>
[not found] ` <CAD=jOEYd-pAQMo3hukx6AhXN7CbH8yGLVLHe2=92wCq-HWS++Q@mail.gmail.com>
2020-04-28 0:58 ` Fwd: a8d5875ce5 ("Default enable RCU list lockdep debugging with .."): WARNING: suspicious RCU usage Mimi Zohar
2020-04-28 11:23 ` Madhuparna Bhowmik
2020-04-28 12:59 ` Mimi Zohar
2020-04-29 10:04 ` Madhuparna Bhowmik
2020-04-29 22:40 ` Paul E. McKenney
2020-04-30 13:07 ` Madhuparna Bhowmik
2020-04-30 13:32 ` Mimi Zohar
2020-04-30 15:08 ` Madhuparna Bhowmik [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=20200430150857.GA30198@madhuparna-HP-Notebook \
--to=madhuparnabhowmik10@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-integrity@vger.kernel.org \
--cc=mjg59@google.com \
--cc=paulmck@kernel.org \
--cc=serge@hallyn.com \
--cc=zohar@linux.ibm.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).