All of lore.kernel.org
 help / color / mirror / Atom feed
* [net] net: decnet: fix netdev refcount leaking on error path
@ 2021-01-26  0:02 Vadim Fedorenko
  2021-01-28  1:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim Fedorenko @ 2021-01-26  0:02 UTC (permalink / raw)
  To: Jakub Kicinski, Andrew Lunn, Gaurav Singh, David Ahern, David Laight
  Cc: Vadim Fedorenko, linux-decnet-user, netdev

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(-)

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;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net] net: decnet: fix netdev refcount leaking on error path
  2021-01-26  0:02 [net] net: decnet: fix netdev refcount leaking on error path Vadim Fedorenko
@ 2021-01-28  1:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-28  1:40 UTC (permalink / raw)
  To: Vadim Fedorenko
  Cc: kuba, andrew, gaurav1086, dsahern, David.Laight,
	linux-decnet-user, netdev

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-28  1:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26  0:02 [net] net: decnet: fix netdev refcount leaking on error path Vadim Fedorenko
2021-01-28  1:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.