Patch "tun: Fix xdp_rxq_info's queue_index when detaching" has been added to the 5.4-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

    tun: Fix xdp_rxq_info's queue_index when detaching

to the 5.4-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:
     tun-fix-xdp_rxq_info-s-queue_index-when-detaching.patch
and it can be found in the queue-5.4 subdirectory.

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



commit f096fdb1e28f2bcbbd036d02baadd6e107b897ff
Author: Yunjian Wang <wangyunjian@xxxxxxxxxx>
Date:   Tue Feb 20 11:12:07 2024 +0800

    tun: Fix xdp_rxq_info's queue_index when detaching
    
    [ Upstream commit 2a770cdc4382b457ca3d43d03f0f0064f905a0d0 ]
    
    When a queue(tfile) is detached, we only update tfile's queue_index,
    but do not update xdp_rxq_info's queue_index. This patch fixes it.
    
    Fixes: 8bf5c4ee1889 ("tun: setup xdp_rxq_info")
    Signed-off-by: Yunjian Wang <wangyunjian@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/1708398727-46308-1-git-send-email-wangyunjian@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index c595262c109ac..47958e6bd77fb 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -715,6 +715,7 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
 				   tun->tfiles[tun->numqueues - 1]);
 		ntfile = rtnl_dereference(tun->tfiles[index]);
 		ntfile->queue_index = index;
+		ntfile->xdp_rxq.queue_index = index;
 		rcu_assign_pointer(tun->tfiles[tun->numqueues - 1],
 				   NULL);
 




[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