]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/tun.c
tun: move the call to tun_set_real_num_queues
authorGeorge Amanakis <gamanakis@gmail.com>
Wed, 30 Jan 2019 03:50:13 +0000 (22:50 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitb9cbbf6bef46ee0cfa32edf0db9b7916ceda754d
treecdeb740bff1933432eb0d7943f37f31079797557
parente557fc8f4df9e0adab78ff184365391ad9c27de5
tun: move the call to tun_set_real_num_queues

BugLink: https://bugs.launchpad.net/bugs/1837664
[ Upstream commit 3a03cb8456cc1d61c467a5375e0a10e5207b948c ]

Call tun_set_real_num_queues() after the increment of tun->numqueues
since the former depends on it. Otherwise, the number of queues is not
correctly accounted for, which results to warnings similar to:
"vnet0 selects TX queue 11, but real number of TX queues is 11".

Fixes: 0b7959b62573 ("tun: publish tfile after it's fully initialized")
Reported-and-tested-by: George Amanakis <gamanakis@gmail.com>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/tun.c