Skip to content
Commit eb0fb363 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

tuntap: attach queue 0 before registering netdevice



We attach queue 0 after registering netdevice currently. This leads to call
netif_set_real_num_{tx|rx}_queues() after registering the netdevice. Since we
allow tun/tap has a maximum of 1024 queues, this may lead a huge number of
uevents to be injected to userspace since we create 2048 kobjects and then
remove 2046. Solve this problem by attaching queue 0 and set the real number of
queues before registering netdevice.

Reported-by: default avatarJiri Slaby <jslaby@suse.cz>
Tested-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 092a5fc9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment