[Intel-wired-lan] [PATCH net v1 5/8] iavf: Fix race in init state
Jankowski, Konrad0
konrad0.jankowski at intel.com
Fri Feb 25 16:16:41 UTC 2022
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Mateusz Palczewski
> Sent: Wednesday, February 23, 2022 1:38 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Laba, SlawomirX <slawomirx.laba at intel.com>; Burra, Phani R
> <phani.r.burra at intel.com>; Palczewski, Mateusz
> <mateusz.palczewski at intel.com>
> Subject: [Intel-wired-lan] [PATCH net v1 5/8] iavf: Fix race in init state
>
> From: SlawomirX Laba <slawomirx.laba at intel.com>
>
> When iavf_init_version_check sends VIRTCHNL_OP_GET_VF_RESOURCES
> message, the driver will wait for the response after requeueing the
> watchdog task in iavf_init_get_resources call stack. The logic is implemented
> this way that iavf_init_get_resources has to be called in order to allocate
> adapter->vf_res. It is polling for the AQ response in iavf_get_vf_config
> function. Expect a call trace from kernel when adminq_task worker handles
> this message first. adapter->vf_res will be NULL in iavf_virtchnl_completion.
>
> Make the watchdog task not queue the adminq_task if the init process is not
> finished yet.
>
> Fixes: 898ef1cb1cb2 ("iavf: Combine init and watchdog state machines")
> Signed-off-by: Slawomir Laba <slawomirx.laba at intel.com>
> Signed-off-by: Phani Burra <phani.r.burra at intel.com>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Signed-off-by: Mateusz Palczewski <mateusz.palczewski at intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c
> b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 67349d2..36433d6 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -2532,7 +2532,8 @@ static void iavf_watchdog_task(struct work_struct
Tested-by: Konrad Jankowski <konrad0.jankowski at intel.com>
More information about the Intel-wired-lan
mailing list