kernel_optimize_test/net/8021q
Jakub Kicinski 9591f32a63 net: vlan: avoid leaks on register_vlan_dev() failures
[ Upstream commit 55b7ab1178cbf41f979ff83236d3321ad35ed2ad ]

VLAN checks for NETREG_UNINITIALIZED to distinguish between
registration failure and unregistration in progress.

Since commit cb626bf566 ("net-sysfs: Fix reference count leak")
registration failure may, however, result in NETREG_UNREGISTERED
as well as NETREG_UNINITIALIZED.

This fix is similer to cebb69754f ("rtnetlink: Fix
memory(net_device) leak when ->newlink fails")

Fixes: cb626bf566 ("net-sysfs: Fix reference count leak")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-17 14:16:55 +01:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
vlan_core.c net: vlan: suppress "failed to kill vid" warnings 2020-02-17 14:30:54 -08:00
vlan_dev.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vlan_gvrp.c
vlan_mvrp.c
vlan_netlink.c
vlan.c net: vlan: avoid leaks on register_vlan_dev() failures 2021-01-17 14:16:55 +01:00
vlan.h net: vlan: Avoid using BUG() in vlan_proto_idx() 2020-09-25 14:12:18 -07:00
vlanproc.c
vlanproc.h