diff options
author | Serey Kong <serey.kong@intel.com> | 2014-08-01 16:27:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-02 22:41:15 -0400 |
commit | 8bb1a540450c3dbd075491ea43772ac8a7ddec46 (patch) | |
tree | 6f6da2803db73ee34b08ccab20ad3d08dcb4693c | |
parent | 6ba36a246ef58100ff3f31b0738e317cfab1f240 (diff) |
i40evf: Fixed guest OS panic when removing vf driver
Removing VF driver during device still in reset caused guest OS panic.
in the i40evf_remove(), we're trying to clean mac_filter_list which has
not been initialized since the device is still stuck at the reset.
The change is to initialize the filter_list before setting any task.
Change-ID: I8b59df7384416c7e6f2d264b598f447e1c2c92b0
Signed-off-by: Serey Kong <serey.kong@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index e5679d82e0c0..ab15f4d07e41 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c | |||
@@ -2137,8 +2137,6 @@ static void i40evf_init_task(struct work_struct *work) | |||
2137 | ether_addr_copy(netdev->dev_addr, adapter->hw.mac.addr); | 2137 | ether_addr_copy(netdev->dev_addr, adapter->hw.mac.addr); |
2138 | ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr); | 2138 | ether_addr_copy(netdev->perm_addr, adapter->hw.mac.addr); |
2139 | 2139 | ||
2140 | INIT_LIST_HEAD(&adapter->mac_filter_list); | ||
2141 | INIT_LIST_HEAD(&adapter->vlan_filter_list); | ||
2142 | f = kzalloc(sizeof(*f), GFP_ATOMIC); | 2140 | f = kzalloc(sizeof(*f), GFP_ATOMIC); |
2143 | if (NULL == f) | 2141 | if (NULL == f) |
2144 | goto err_sw_init; | 2142 | goto err_sw_init; |
@@ -2320,6 +2318,9 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2320 | hw->bus.device = PCI_SLOT(pdev->devfn); | 2318 | hw->bus.device = PCI_SLOT(pdev->devfn); |
2321 | hw->bus.func = PCI_FUNC(pdev->devfn); | 2319 | hw->bus.func = PCI_FUNC(pdev->devfn); |
2322 | 2320 | ||
2321 | INIT_LIST_HEAD(&adapter->mac_filter_list); | ||
2322 | INIT_LIST_HEAD(&adapter->vlan_filter_list); | ||
2323 | |||
2323 | INIT_WORK(&adapter->reset_task, i40evf_reset_task); | 2324 | INIT_WORK(&adapter->reset_task, i40evf_reset_task); |
2324 | INIT_WORK(&adapter->adminq_task, i40evf_adminq_task); | 2325 | INIT_WORK(&adapter->adminq_task, i40evf_adminq_task); |
2325 | INIT_WORK(&adapter->watchdog_task, i40evf_watchdog_task); | 2326 | INIT_WORK(&adapter->watchdog_task, i40evf_watchdog_task); |