[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_-uH_aBVqLSkC2u@mail.minyard.net>
Date: Wed, 16 Apr 2025 08:18:23 -0500
From: Corey Minyard <corey@...yard.net>
To: Breno Leitao <leitao@...ian.org>, Rik van Riel <riel@...riel.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
openipmi-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, kernel-team@...a.com
Subject: Re: [PATCH] ipmi: fix suspicious RCU usage warning
On Mon, Mar 17, 2025 at 07:27:30AM -0500, Corey Minyard wrote:
> On Mon, Mar 17, 2025 at 02:33:31AM -0700, Breno Leitao wrote:
> > On Wed, Mar 12, 2025 at 01:19:32PM -0400, Rik van Riel wrote:
> > > On recent kernels this warning fires:
> > >
> > > drivers/char/ipmi/ipmi_msghandler.c:1238 RCU-list traversed in non-reader section!!
> > >
> > > This looks like a fairly simple lockdep trigger, where
> > > list_for_each_entry_rcu and list_for_each_entry_srcu are
> > > functionally identical, but the lockdep annotation in
> > > the former has an extra check.
> > >
> > > That extra check is whether the RCU read lock is held,
> > > which is not true when the code uses srcu_read_lock.
> > >
> > > Get rid of the warning by using the properly annotated
> > > list traversal macro.
> >
> > Thanks for looking at this one.
> >
> > There was a discussion about this issue a few years ago, with
> > a different approach that never landed upstream.
> >
> > https://lore.kernel.org/all/20201119123831.GH3710@minyard.net/#r
>
> I thought this looked familiar.
>
> Breno, I believe you suggested a change to the patch that sounded
> reasonable, so I removed the patch, and then nothing happened and I
> didn't follow up.
>
> This is kind of a mess :-(. Let me look at it.
I've been working on this, so it's not forgotten. Actually, I've mostly
been working on a test framework for the IPMI driver, which has been a
fairly big job.
The modification was fairly easy. I decided to just pull srcu out of
this and use a different method. And I'm not going to do that without
some serious testing, thus the delay.
Reviewing the code has shown me that the IPMI driver needs some TLC in
some places.
Anyway, expect some changes in the next few days.
-corey
Powered by blists - more mailing lists