diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-12-31 06:40:27 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-01-06 03:25:31 +0300 |
commit | 55b7ab1178cbf41f979ff83236d3321ad35ed2ad (patch) | |
tree | 416fc729fda3813f01f22c481acddb981df1b015 /drivers/net | |
parent | cf0720697143f3eaa0779cca5a6602d8557d1c6f (diff) | |
download | linux-55b7ab1178cbf41f979ff83236d3321ad35ed2ad.tar.xz |
net: vlan: avoid leaks on register_vlan_dev() failures
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>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions