Skip to content

Commit 2a770cd

Browse files
wyjwangkuba-moo
authored andcommitted
tun: Fix xdp_rxq_info's queue_index when detaching
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: 8bf5c4e ("tun: setup xdp_rxq_info") Signed-off-by: Yunjian Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b0b1210 commit 2a770cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/tun.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
653653
tun->tfiles[tun->numqueues - 1]);
654654
ntfile = rtnl_dereference(tun->tfiles[index]);
655655
ntfile->queue_index = index;
656+
ntfile->xdp_rxq.queue_index = index;
656657
rcu_assign_pointer(tun->tfiles[tun->numqueues - 1],
657658
NULL);
658659

0 commit comments

Comments
 (0)