Re: Fwd: a8d5875ce5 ("Default enable RCU list lockdep debugging with .."): WARNING: suspicious RCU usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux