[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c91441ec-11d3-4580-b51d-8b1bbdb58172@yandex.ru>
Date: Wed, 23 Oct 2024 11:18:10 +0300
From: Dmitry Antipov <dmantipov@...dex.ru>
To: Joe Damato <jdamato@...tly.com>, Simon Horman <horms@...nel.org>,
Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: RTNL: assertion failed at net/core/dev.c
On 10/22/24 10:56 PM, Joe Damato wrote:
> Intends to fix the bug you hit. If you do test this patch and it
> works for you, please let me know.
Well, the following patch (over net-next at least) fixes the reboot issue for me:
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 4de9b156b2be..1cae92f136e5 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3509,7 +3509,9 @@ static void e1000_reset_task(struct work_struct *work)
container_of(work, struct e1000_adapter, reset_task);
e_err(drv, "Reset adapter\n");
+ rtnl_lock();
e1000_reinit_locked(adapter);
+ rtnl_unlock();
}
/**
@@ -5074,7 +5076,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();
e1000_down(adapter);
+ rtnl_unlock();
}
status = er32(STATUS);
@@ -5240,8 +5244,11 @@ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
if (state == pci_channel_io_perm_failure)
return PCI_ERS_RESULT_DISCONNECT;
- if (netif_running(netdev))
+ if (netif_running(netdev)) {
+ rtnl_lock();
e1000_down(adapter);
+ rtnl_unlock();
+ }
if (!test_and_set_bit(__E1000_DISABLED, &adapter->flags))
pci_disable_device(pdev);
OTOH I would refrain from Tested-by: just because I'm running an emulated environment
generated by syzbot, and this thing is definitely better to be tested by more people
with real e1000 hardware.
Thanks,
Dmitry
Powered by blists - more mailing lists