]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jan 2019 05:40:25 +0000 (21:40 -0800)
commitbc7f2ee02142166c70ab8e6577a723b8da14644a
tree6bb5e3d2847b954be1f1d4102bc568c5ec8c937b
parent8e948a9f62f4ace55347a3ffee05db51e502a359
tun: move the call to tun_set_real_num_queues

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: 16022f7e4ad3 ("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>
drivers/net/tun.c