All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>,
	"Paul E. McKenney" <paulmck@kernel.org>
Cc: 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 09:32:30 -0400	[thread overview]
Message-ID: <1588253550.5167.26.camel@linux.ibm.com> (raw)
In-Reply-To: <20200430130713.GA27353@madhuparna-HP-Notebook>

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.

thanks,

Mimi

  reply	other threads:[~2020-04-30 13:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  2:30 a8d5875ce5 ("Default enable RCU list lockdep debugging with .."): WARNING: suspicious RCU usage kernel test robot
     [not found] ` <CAD=jOEYd-pAQMo3hukx6AhXN7CbH8yGLVLHe2=92wCq-HWS++Q@mail.gmail.com>
2020-04-28  0:58   ` Fwd: " 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 [this message]
2020-04-30 15:08                 ` Madhuparna Bhowmik

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=1588253550.5167.26.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=madhuparnabhowmik10@gmail.com \
    --cc=mjg59@google.com \
    --cc=paulmck@kernel.org \
    --cc=serge@hallyn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.