[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxfS5-HHcbMsjc_I@LQ3V64L9R2>
Date: Tue, 22 Oct 2024 09:29:27 -0700
From: Joe Damato <jdamato@...tly.com>
To: Dmitry Antipov <dmantipov@...dex.ru>, Simon Horman <horms@...nel.org>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: RTNL: assertion failed at net/core/dev.c
On Tue, Oct 22, 2024 at 09:27:03AM -0700, Joe Damato wrote:
> On Tue, Oct 22, 2024 at 11:24:45AM +0300, Dmitry Antipov wrote:
> > Hello,
> >
> > running around https://syzkaller.appspot.com/bug?extid=b390c8062d8387b6272a
> > with net-next and linux-next, I've noticed the following:
[...]
>
> Thanks for reporting this.
>
> The issue is that in the path highlighted above, rtnl is not held
> before e1000_down is called.
>
> I believe this will fix the issue you are seeing, but I am not sure
> if a similar change needs to be added for power management's suspend
> (which also eventually calls e1000_down):
>
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 4de9b156b2be..ebbd3fa3a5c8 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -5074,7 +5074,9 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
> usleep_range(10000, 20000);
>
> WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
> + rtnl_lock()
As you can see, I didn't compile test this as I'm missing a
semicolon (sorry).
I am still reading through the source to see what other spots may
need rtnl_lock.
Powered by blists - more mailing lists