]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: set default network namespace in init_dummy_netdev()
authorJosh Elsasser <jelsasser@appneta.com>
Sat, 26 Jan 2019 22:38:33 +0000 (14:38 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit6ea11d8a9df233bf2ec1928a92ff4c02e1970e6f
tree57963573fd1f52f6add373a4aed3677b1ddd04e1
parentca6d61b38f65e299eb6ba936a07e611ac7312008
net: set default network namespace in init_dummy_netdev()

BugLink: https://bugs.launchpad.net/bugs/1837664
[ Upstream commit 35edfdc77f683c8fd27d7732af06cf6489af60a5 ]

Assign a default net namespace to netdevs created by init_dummy_netdev().
Fixes a NULL pointer dereference caused by busy-polling a socket bound to
an iwlwifi wireless device, which bumps the per-net BUSYPOLLRXPACKETS stat
if napi_poll() received packets:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000190
  IP: napi_busy_loop+0xd6/0x200
  Call Trace:
    sock_poll+0x5e/0x80
    do_sys_poll+0x324/0x5a0
    SyS_poll+0x6c/0xf0
    do_syscall_64+0x6b/0x1f0
    entry_SYSCALL_64_after_hwframe+0x3d/0xa2

Fixes: 7db6b048da3b ("net: Commonize busy polling code to focus on napi_id instead of socket")
Signed-off-by: Josh Elsasser <jelsasser@appneta.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>
net/core/dev.c