[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210105.162640.1289650521957881983.davem@davemloft.net>
Date: Tue, 05 Jan 2021 16:26:40 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: kuba@...nel.org
Cc: netdev@...r.kernel.org, f.fainelli@...il.com,
jouni.hogander@...kie.com
Subject: Re: [PATCH net] net: vlan: avoid leaks on register_vlan_dev()
failures
From: Jakub Kicinski <kuba@...nel.org>
Date: Wed, 30 Dec 2020 19:40:27 -0800
> 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@...nel.org>
> ---
> Found by code inspection and compile-tested only.
This entire area is inconsistent, and confusing at best.
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists