Re: [PATCH net-next] net: ethtool: Fix suspicious rcu_dereference usage

From: Kory Maincent
Date: Wed Dec 18 2024 - 04:10:20 EST


On Tue, 17 Dec 2024 18:28:16 +0100
Eric Dumazet <edumazet@xxxxxxxxxx> wrote:

> On Tue, Dec 17, 2024 at 6:17 PM Kory Maincent <kory.maincent@xxxxxxxxxxx>
> wrote:
> >
> > On Tue, 17 Dec 2024 16:47:07 +0100
> > Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
> >
> > > On Tue, Dec 17, 2024 at 3:03 PM Kory Maincent <kory.maincent@xxxxxxxxxxx>
> > > wrote:
> [...]
> > >
> > > I have to ask : Can you tell how this patch has been tested ?
> >
> > Oh, it was not at all sufficiently tested. Sorry!
> > I thought I had spotted the issue but I hadn't.
> >
> > > rcu is not held according to syzbot report.
> > >
> > > If rtnl and rcu are not held, lockdep will still complain.
> >
> > You are totally right.
> > I may be able to see it with the timestamping kselftest. I will try.
>
> syzbot has a repro that you can compile and run.

Oh indeed, thanks for the pointer.

> Make sure to build and use a kernel with
>
> CONFIG_PROVE_LOCKING=y

Yes I did.

Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com