Patch "iavf: Fix race in init state" has been added to the 5.16-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iavf: Fix race in init state

to the 5.16-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iavf-fix-race-in-init-state.patch
and it can be found in the queue-5.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e890ce16df6f8ce37e95dc56b74ff4da0c1aaaaf
Author: Slawomir Laba <slawomirx.laba@xxxxxxxxx>
Date:   Wed Feb 23 13:38:01 2022 +0100

    iavf: Fix race in init state
    
    [ Upstream commit a472eb5cbaebb5774672c565e024336c039e9128 ]
    
    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@xxxxxxxxx>
    Signed-off-by: Phani Burra <phani.r.burra@xxxxxxxxx>
    Signed-off-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
    Signed-off-by: Mateusz Palczewski <mateusz.palczewski@xxxxxxxxx>
    Tested-by: Konrad Jankowski <konrad0.jankowski@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 1af3fe427543..9ed02a8ca7a3 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2124,7 +2124,8 @@ static void iavf_watchdog_task(struct work_struct *work)
 	schedule_delayed_work(&adapter->client_task, msecs_to_jiffies(5));
 	mutex_unlock(&adapter->crit_lock);
 restart_watchdog:
-	queue_work(iavf_wq, &adapter->adminq_task);
+	if (adapter->state >= __IAVF_DOWN)
+		queue_work(iavf_wq, &adapter->adminq_task);
 	if (adapter->aq_required)
 		queue_delayed_work(iavf_wq, &adapter->watchdog_task,
 				   msecs_to_jiffies(20));



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux