diff mbox series

[net] net: decnet: fix netdev refcount leaking on error path

Message ID 1611619334-20955-1-git-send-email-vfedorenko@novek.ru (mailing list archive)
State Accepted
Commit 3f96d644976825986a93b7b9fe6a9900a80f2e11
Delegated to: Netdev Maintainers
Headers show
Series [net] net: decnet: fix netdev refcount leaking on error path | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers warning 1 maintainers not CCed: davem@davemloft.net
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Vadim Fedorenko Jan. 26, 2021, 12:02 a.m. UTC
On building the route there is an assumption that the destination
could be local. In this case loopback_dev is used to get the address.
If the address is still cannot be retrieved dn_route_output_slow
returns EADDRNOTAVAIL with loopback_dev reference taken.

Cannot find hash for the fixes tag because this code was introduced
long time ago. I don't think that this bug has ever fired but the
patch is done just to have a consistent code base.

Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
---
 net/decnet/dn_route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 28, 2021, 1:40 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue, 26 Jan 2021 03:02:14 +0300 you wrote:
> On building the route there is an assumption that the destination
> could be local. In this case loopback_dev is used to get the address.
> If the address is still cannot be retrieved dn_route_output_slow
> returns EADDRNOTAVAIL with loopback_dev reference taken.
> 
> Cannot find hash for the fixes tag because this code was introduced
> long time ago. I don't think that this bug has ever fired but the
> patch is done just to have a consistent code base.
> 
> [...]

Here is the summary with links:
  - [net] net: decnet: fix netdev refcount leaking on error path
    https://git.kernel.org/netdev/net/c/3f96d6449768

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 4cac31d..2193ae5 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1035,7 +1035,7 @@  static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *o
 			fld.saddr = dnet_select_source(dev_out, 0,
 						       RT_SCOPE_HOST);
 			if (!fld.daddr)
-				goto out;
+				goto done;
 		}
 		fld.flowidn_oif = LOOPBACK_IFINDEX;
 		res.type = RTN_LOCAL;