[Intel-wired-lan] [PATCH net v1] i40e: Fix reset path while removing the driver
G, GurucharanX
gurucharanx.g at intel.com
Fri Jan 21 08:59:15 UTC 2022
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Karen Sornek
> Sent: Wednesday, January 12, 2022 2:50 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Laba, SlawomirX <slawomirx.laba at intel.com>; Sornek, Karen
> <karen.sornek at intel.com>; Sylwester Dziedziuch
> <sylwesterx.dziedziuch at intel.com>
> Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix reset path while removing
> the driver
>
> Fix the crash in kernel while dereferencing the NULL pointer, when the driver
> is unloaded and simultaneously the vsi rings are being stopped.
>
> The hardware requires 50msec in order to finish RX queues disable. For this
> purpose the driver spins in mdelay function for the operation to be
> completed.
>
> For example changing number of queues which requires reset would fail in
> the following call stack:
>
> 1) i40e_prep_for_reset
> 2) i40e_pf_quiesce_all_vsi
> 3) i40e_quiesce_vsi
> 4) i40e_vsi_close
> 5) i40e_down
> 6) i40e_vsi_stop_rings
> 7) i40e_vsi_control_rx -> disable requires the delay of 50msecs
> 8) continue back in i40e_down function where
> i40e_clean_tx_ring(vsi->tx_rings[i]) is going to crash
>
> When the driver was spinning vsi_release called i40e_vsi_free_arrays where
> the vsi->tx_rings resources were freed and the pointer was set to NULL.
>
> Fixes: 5b6d4a7f20b0 ("i40e: Fix crash during removing i40e driver")
> Signed-off-by: Slawomir Laba <slawomirx.laba at intel.com>
> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch at intel.com>
> Signed-off-by: Karen Sornek <karen.sornek at intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 1 +
> drivers/net/ethernet/intel/i40e/i40e_main.c | 19 ++++++++++++++++++-
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
Tested-by: Gurucharan G <gurucharanx.g at intel.com> (A Contingent worker at Intel)
More information about the Intel-wired-lan
mailing list