The variable status is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Fix from upstream
The variable ret is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Fix from upstream
The variable status is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Fix from upstream
The variable ret is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Fix from upstream
The copy of copy_net_ns used when the network stack is not
built is broken as it does not return -EINVAL when attempting
to create a new network namespace. We don't even have
a previous network namespace.
Since we need a copy of copy_net_ns in net/net_namespace.h that is
available when the networking stack is not built at all move the
correct version of copy_net_ns from net_namespace.c into net_namespace.h
Leaving us with just 2 versions of copy_net_ns. One version for when
we compile in network namespace suport and another stub for all other
occasions.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.7&id=d727abcb2355566a3372ee1810f156fba75112b7
The copy of copy_net_ns used when the network stack is not
built is broken as it does not return -EINVAL when attempting
to create a new network namespace. We don't even have
a previous network namespace.
Since we need a copy of copy_net_ns in net/net_namespace.h that is
available when the networking stack is not built at all move the
correct version of copy_net_ns from net_namespace.c into net_namespace.h
Leaving us with just 2 versions of copy_net_ns. One version for when
we compile in network namespace suport and another stub for all other
occasions.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.7&id=d727abcb2355566a3372ee1810f156fba75112b7
Note: make sure to disable not used lan interfaces
***BIG THX to user txnative from www.linksysinfo.org for testing/helping***
Fix/help for commit 543caca (Merged in enable-kernel-network-namespace) (bootloop/crash for R6400v2 / R6700v3)
and also solve warning at boot, see cut below!
------------[ cut here ]------------
WARNING: at net/core/dev.c:4870 rollback_registered_many+0xf8/0x29c()
module: et bf011000 74220
module: igs bf009000 11927
module: emf bf000000 15105
Modules linked in: et(P+) igs(P) emf(P)
[<c0055000>] (unwind_backtrace+0x0/0xf8) from [<c0073298>] (warn_slowpath_common+0x4c/0x64)
[<c0073298>] (warn_slowpath_common+0x4c/0x64) from [<c00732cc>] (warn_slowpath_null+0x1c/0x24)
[<c00732cc>] (warn_slowpath_null+0x1c/0x24) from [<c020cad0>] (rollback_registered_many+0xf8/0x29c)
[<c020cad0>] (rollback_registered_many+0xf8/0x29c) from [<c020cd54>] (unregister_netdevice_queue+0x70/0xb8)
[<c020cd54>] (unregister_netdevice_queue+0x70/0xb8) from [<c020cdb4>] (unregister_netdev+0x18/0x20)
[<c020cdb4>] (unregister_netdev+0x18/0x20) from [<bf01119c>] (et_free+0x48/0x154 [et])
[<bf01119c>] (et_free+0x48/0x154 [et]) from [<bf01e124>] (et_probe+0x624/0x6bc [et])
[<bf01e124>] (et_probe+0x624/0x6bc [et]) from [<c0185d48>] (pci_device_probe+0x5c/0x80)
[<c0185d48>] (pci_device_probe+0x5c/0x80) from [<c01a4940>] (driver_probe_device+0x78/0x174)
[<c01a4940>] (driver_probe_device+0x78/0x174) from [<c01a4ac8>] (__driver_attach+0x8c/0x90)
[<c01a4ac8>] (__driver_attach+0x8c/0x90) from [<c01a3b9c>] (bus_for_each_dev+0x54/0x80)
[<c01a3b9c>] (bus_for_each_dev+0x54/0x80) from [<c01a4294>] (bus_add_driver+0x98/0x230)
[<c01a4294>] (bus_add_driver+0x98/0x230) from [<c01a4ccc>] (driver_register+0x78/0x13c)
[<c01a4ccc>] (driver_register+0x78/0x13c) from [<c0185fb0>] (__pci_register_driver+0x44/0xb4)
[<c0185fb0>] (__pci_register_driver+0x44/0xb4) from [<c004e5bc>] (do_one_initcall+0x30/0x19c)
[<c004e5bc>] (do_one_initcall+0x30/0x19c) from [<c00a07ac>] (sys_init_module+0x11c/0x1bac)
[<c00a07ac>] (sys_init_module+0x11c/0x1bac) from [<c004eac0>] (ret_fast_syscall+0x0/0x30)
---[ end trace 2e1525ddd9289681 ]---
network todo 'eth%d' but state 0
[<c0055000>] (unwind_backtrace+0x0/0xf8) from [<c020f0a8>] (netdev_run_todo+0x1d0/0x21c)
[<c020f0a8>] (netdev_run_todo+0x1d0/0x21c) from [<bf01119c>] (et_free+0x48/0x154 [et])
[<bf01119c>] (et_free+0x48/0x154 [et]) from [<bf01e124>] (et_probe+0x624/0x6bc [et])
[<bf01e124>] (et_probe+0x624/0x6bc [et]) from [<c0185d48>] (pci_device_probe+0x5c/0x80)
[<c0185d48>] (pci_device_probe+0x5c/0x80) from [<c01a4940>] (driver_probe_device+0x78/0x174)
[<c01a4940>] (driver_probe_device+0x78/0x174) from [<c01a4ac8>] (__driver_attach+0x8c/0x90)
[<c01a4ac8>] (__driver_attach+0x8c/0x90) from [<c01a3b9c>] (bus_for_each_dev+0x54/0x80)
[<c01a3b9c>] (bus_for_each_dev+0x54/0x80) from [<c01a4294>] (bus_add_driver+0x98/0x230)
[<c01a4294>] (bus_add_driver+0x98/0x230) from [<c01a4ccc>] (driver_register+0x78/0x13c)
[<c01a4ccc>] (driver_register+0x78/0x13c) from [<c0185fb0>] (__pci_register_driver+0x44/0xb4)
[<c0185fb0>] (__pci_register_driver+0x44/0xb4) from [<c004e5bc>] (do_one_initcall+0x30/0x19c)
[<c004e5bc>] (do_one_initcall+0x30/0x19c) from [<c00a07ac>] (sys_init_module+0x11c/0x1bac)
[<c00a07ac>] (sys_init_module+0x11c/0x1bac) from [<c004eac0>] (ret_fast_syscall+0x0/0x30)
fix null pointer and empty string handling
The previous behavor is infinite loop
examples:
"" empty string
"vendor:for,model:bar," invalid options, please note the comma at the end
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
Fix from upstream: 4d05c81ab2