netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [netdev-next] net: release reference to inet6_dev pointer
@ 2023-08-16 22:02 Patrick Rohr
  2023-08-18  8:06 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Rohr @ 2023-08-16 22:02 UTC (permalink / raw)
  To: David S. Miller
  Cc: Linux Network Development Mailing List, Patrick Rohr,
	Maciej Żenczykowski, Lorenzo Colitti, David Ahern

addrconf_prefix_rcv returned early without releasing the inet6_dev
pointer when the PIO lifetime is less than accept_ra_min_lft.

Fixes: 5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes")
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: David Ahern <dsahern@kernel.org>
Signed-off-by: Patrick Rohr <prohr@google.com>
---
 net/ipv6/addrconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5184bd0ceb12..47d1dd8501b7 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2742,7 +2742,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
 	}
 
 	if (valid_lft != 0 && valid_lft < in6_dev->cnf.accept_ra_min_lft)
-		return;
+		goto put;
 
 	/*
 	 *	Two things going on here:
-- 
2.41.0.694.ge786442a9b-goog


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

end of thread, other threads:[~2023-08-18  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 22:02 [netdev-next] net: release reference to inet6_dev pointer Patrick Rohr
2023-08-18  8:06 ` Simon Horman
2023-08-18  8:10   ` Maciej Żenczykowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).