netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Damato <jdamato@fastly.com>
To: Dmitry Antipov <dmantipov@yandex.ru>,
	Simon Horman <horms@kernel.org>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: RTNL: assertion failed at net/core/dev.c
Date: Tue, 22 Oct 2024 09:29:27 -0700	[thread overview]
Message-ID: <ZxfS5-HHcbMsjc_I@LQ3V64L9R2> (raw)
In-Reply-To: <ZxfSV66cYq7N6i5H@LQ3V64L9R2>

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.

  reply	other threads:[~2024-10-22 16:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  8:24 RTNL: assertion failed at net/core/dev.c Dmitry Antipov
2024-10-22 16:27 ` Joe Damato
2024-10-22 16:29   ` Joe Damato [this message]
2024-10-22 19:56 ` Joe Damato
2024-10-23  8:18   ` Dmitry Antipov
  -- strict thread matches above, loose matches on Subject: below --
2007-09-02 16:05 Christian Kujau
2007-09-02 16:13 ` Stephen Hemminger
2007-09-02 18:04   ` Christian Kujau
2007-09-02 16:13 ` Johannes Berg

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=ZxfS5-HHcbMsjc_I@LQ3V64L9R2 \
    --to=jdamato@fastly.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=dmantipov@yandex.ru \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).