mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 01:07:09 +07:00
edfc23ee3e
Although rare, it's possible to hit PCI error early on device probe, meaning possibly some structs are not entirely initialized, and some might even be completely uninitialized, leading to NULL pointer dereference. The i40e driver currently presents a "bad" behavior if device hits such early PCI error: firstly, the struct i40e_pf might not be attached to pci_dev yet, leading to a NULL pointer dereference on access to pf->state. Even checking if the struct is NULL and avoiding the access in that case isn't enough, since the driver cannot recover from PCI error that early; in our experiments we saw multiple failures on kernel log, like: [549.664] i40e 0007:01:00.1: Initial pf_reset failed: -15 [549.664] i40e: probe of 0007:01:00.1 failed with error -15 [...] [871.644] i40e 0007:01:00.1: The driver for the device stopped because the device firmware failed to init. Try updating your NVM image. [871.644] i40e: probe of 0007:01:00.1 failed with error -32 [...] [872.516] i40e 0007:01:00.0: ARQ: Unknown event 0x0000 ignored Between the first probe failure (error -15) and the second (error -32) another PCI error happened due to the first bad probe. Also, driver started to flood console with those ARQ event messages. This patch will prevent these issues by allowing error recovery mechanism to remove the failed device from the system instead of trying to recover from early PCI errors during device probe. CC: <stable@vger.kernel.org> Signed-off-by: Guilherme G Piccoli <gpiccoli@linux.vnet.ibm.com> Acked-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
i40e_adminq_cmd.h | ||
i40e_adminq.c | ||
i40e_adminq.h | ||
i40e_alloc.h | ||
i40e_client.c | ||
i40e_client.h | ||
i40e_common.c | ||
i40e_dcb_nl.c | ||
i40e_dcb.c | ||
i40e_dcb.h | ||
i40e_debugfs.c | ||
i40e_devids.h | ||
i40e_diag.c | ||
i40e_diag.h | ||
i40e_ethtool.c | ||
i40e_fcoe.c | ||
i40e_fcoe.h | ||
i40e_hmc.c | ||
i40e_hmc.h | ||
i40e_lan_hmc.c | ||
i40e_lan_hmc.h | ||
i40e_main.c | ||
i40e_nvm.c | ||
i40e_osdep.h | ||
i40e_prototype.h | ||
i40e_ptp.c | ||
i40e_register.h | ||
i40e_status.h | ||
i40e_txrx.c | ||
i40e_txrx.h | ||
i40e_type.h | ||
i40e_virtchnl_pf.c | ||
i40e_virtchnl_pf.h | ||
i40e_virtchnl.h | ||
i40e.h | ||
Makefile |