linux-brain/net/8021q
Jakub Kicinski 37e6368a8d 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 cb626bf566eb ("net-sysfs: Fix reference count leak")
registration failure may, however, result in NETREG_UNREGISTERED
as well as NETREG_UNINITIALIZED.

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

Fixes: cb626bf566eb ("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:05:31 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile net: remove blank lines at end of file 2018-07-24 14:10:43 -07:00
vlan.c net: vlan: avoid leaks on register_vlan_dev() failures 2021-01-17 14:05:31 +01:00
vlan.h vlan: fix memory leak in vlan_dev_set_egress_priority 2020-01-12 12:21:49 +01:00
vlan_core.c net: 8021q: move vlan offload registrations into vlan_core 2018-11-16 19:51:08 -08:00
vlan_dev.c vlan: fix memory leak in vlan_dev_set_egress_priority 2020-01-12 12:21:49 +01:00
vlan_gvrp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vlan_mvrp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vlan_netlink.c vlan: vlan_changelink() should propagate errors 2020-01-12 12:21:50 +01:00
vlanproc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
vlanproc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00