2021-06-12 13:50:26

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH] ixgbe: Fix an error handling path in 'ixgbe_probe()'

If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: 6fabd715e6d8 ("ixgbe: Implement PCIe AER support")
Signed-off-by: Christophe JAILLET <[email protected]>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 2ac5b82676f3..39fdc46f34f9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -11069,6 +11069,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state);
free_netdev(netdev);
err_alloc_etherdev:
+ pci_disable_pcie_error_reporting(pdev);
pci_release_mem_regions(pdev);
err_pci_reg:
err_dma:
--
2.30.2


2021-06-23 20:19:29

by Brelinski, TonyX

[permalink] [raw]
Subject: RE: [Intel-wired-lan] [PATCH] ixgbe: Fix an error handling path in 'ixgbe_probe()'

> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Christophe JAILLET
> Sent: Saturday, June 12, 2021 6:46 AM
> To: Brandeburg, Jesse <[email protected]>; Nguyen, Anthony L
> <[email protected]>; [email protected]; [email protected];
> [email protected]; [email protected]
> Cc: [email protected]; [email protected]; Christophe
> JAILLET <[email protected]>; [email protected];
> [email protected]
> Subject: [Intel-wired-lan] [PATCH] ixgbe: Fix an error handling path in
> 'ixgbe_probe()'
>
> If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be
> undone by a corresponding 'pci_disable_pcie_error_reporting()'
> call, as already done in the remove function.
>
> Fixes: 6fabd715e6d8 ("ixgbe: Implement PCIe AER support")
> Signed-off-by: Christophe JAILLET <[email protected]>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 +
> 1 file changed, 1 insertion(+)

Tested-by: Tony Brelinski <[email protected]> (A Contingent Worker at Intel)