Skip to content
Snippets Groups Projects
Commit 906986fe authored by Yunjian Wang's avatar Yunjian Wang Committed by Greg Kroah-Hartman
Browse files

tun: Fix xdp_rxq_info's queue_index when detaching


[ Upstream commit 2a770cdc ]

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: 8bf5c4ee ("tun: setup xdp_rxq_info")
Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
Link: https://lore.kernel.org/r/1708398727-46308-1-git-send-email-wangyunjian@huawei.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2e95350f
No related branches found
No related tags found
No related merge requests found
......@@ -665,6 +665,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment