2016-10-17 17:05:40

by David Singleton

[permalink] [raw]
Subject: [PATCH] e1000e: x86: e1000 driver trying to free already-free irq.

From: khalidm <[email protected]>

During systemd reboot sequence network driver interface is shutdown
by e1000_close. The PCI driver interface is shut by e1000_shutdown.
The e1000_shutdown checks for netif_running status, if still up it
brings down driver. But it disables msi outside of this if statement,
regardless of netif status. All this is OK when e1000_close happens
after shutdown. However, by default, everything in systemd is done
in parallel. This creates a conditions where e1000_shutdown is called
after e1000_close, therefore hitting BUG_ON assert in free_msi_irqs.

Cc-Id: [email protected]
Signed-off-by: khalidm <[email protected]>
Signed-off-by: David Singleton <[email protected]>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7017281..79f02a6 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6283,8 +6283,8 @@ static int e1000e_pm_freeze(struct device *dev)
/* Quiesce the device without resetting the hardware */
e1000e_down(adapter, false);
e1000_free_irq(adapter);
+ e1000e_reset_interrupt_capability(adapter);
}
- e1000e_reset_interrupt_capability(adapter);

/* Allow time for pending master requests to run */
e1000e_disable_pcie_master(&adapter->hw);
--
2.9.3


2016-10-28 02:50:04

by Brown, Aaron F

[permalink] [raw]
Subject: RE: [PATCH] e1000e: x86: e1000 driver trying to free already-free irq.

> From: [email protected] [mailto:netdev-
> [email protected]] On Behalf Of David Singleton
> Sent: Monday, October 17, 2016 9:51 AM
> To: Kirsher, Jeffrey T <[email protected]>
> Cc: khalidm <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: [PATCH] e1000e: x86: e1000 driver trying to free already-free irq.
>
> From: khalidm <[email protected]>
>
> During systemd reboot sequence network driver interface is shutdown
> by e1000_close. The PCI driver interface is shut by e1000_shutdown.
> The e1000_shutdown checks for netif_running status, if still up it
> brings down driver. But it disables msi outside of this if statement,
> regardless of netif status. All this is OK when e1000_close happens
> after shutdown. However, by default, everything in systemd is done
> in parallel. This creates a conditions where e1000_shutdown is called
> after e1000_close, therefore hitting BUG_ON assert in free_msi_irqs.
>
> Cc-Id: [email protected]
> Signed-off-by: khalidm <[email protected]>
> Signed-off-by: David Singleton <[email protected]>
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Aaron Brown <[email protected]>