Patch "virtio_net: fix possible dim status unrecoverable" has been added to the 6.9-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

    virtio_net: fix possible dim status unrecoverable

to the 6.9-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:
     virtio_net-fix-possible-dim-status-unrecoverable.patch
and it can be found in the queue-6.9 subdirectory.

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



commit fa7462e07ebbb3485d27396ff409ad3a857d8c9e
Author: Heng Qi <hengqi@xxxxxxxxxxxxxxxxx>
Date:   Tue May 28 21:41:15 2024 +0800

    virtio_net: fix possible dim status unrecoverable
    
    [ Upstream commit 9e0945b1901c9eed4fbee3b8a3870487b2bdc936 ]
    
    When the dim worker is scheduled, if it no longer needs to issue
    commands, dim may not be able to return to the working state later.
    
    For example, the following single queue scenario:
      1. The dim worker of rxq0 is scheduled, and the dim status is
         changed to DIM_APPLY_NEW_PROFILE;
      2. dim is disabled or parameters have not been modified;
      3. virtnet_rx_dim_work exits directly;
    
    Then, even if net_dim is invoked again, it cannot work because the
    state is not restored to DIM_START_MEASURE.
    
    Fixes: 6208799553a8 ("virtio-net: support rx netdim")
    Signed-off-by: Heng Qi <hengqi@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>
    Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Reviewed-by: Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240528134116.117426-2-hengqi@xxxxxxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 115c3c5414f2a..574b052a517d7 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3589,10 +3589,10 @@ static void virtnet_rx_dim_work(struct work_struct *work)
 			if (err)
 				pr_debug("%s: Failed to send dim parameters on rxq%d\n",
 					 dev->name, qnum);
-			dim->state = DIM_START_MEASURE;
 		}
 	}
 
+	dim->state = DIM_START_MEASURE;
 	rtnl_unlock();
 }
 




[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