i40e: Fix kernel oops when i40e driver removes VF's
authorEryk Rybak <eryk.roch.rybak@intel.com>
Thu, 18 Feb 2021 11:15:26 +0000 (11:15 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 25 Mar 2021 19:49:35 +0000 (12:49 -0700)
commit347b5650cd158d1d953487cc2bec567af5c5bf96
treea04f511c6bbcfe2279a7b7bde3b7859c56c96e01
parent90449e98c265296329446c7abcd2aae3b20c0bc9
i40e: Fix kernel oops when i40e driver removes VF's

Fix the reason of kernel oops when i40e driver removed VFs.
Added new __I40E_VFS_RELEASING state to signalize releasing
process by PF, that it makes possible to exit of reset VF procedure.
Without this patch, it is possible to suspend the VFs reset by
releasing VFs resources procedure. Retrying the reset after the
timeout works on the freed VF memory causing a kernel oops.

Fixes: d43d60e5eb95 ("i40e: ensure reset occurs when disabling VF")
Signed-off-by: Eryk Rybak <eryk.roch.rybak@intel.com>
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c