[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230816220203.1865432-1-prohr@google.com>
Date: Wed, 16 Aug 2023 15:02:03 -0700
From: Patrick Rohr <prohr@...gle.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Linux Network Development Mailing List <netdev@...r.kernel.org>, Patrick Rohr <prohr@...gle.com>,
"Maciej Żenczykowski" <maze@...gle.com>, Lorenzo Colitti <lorenzo@...gle.com>, David Ahern <dsahern@...nel.org>
Subject: [netdev-next] net: release reference to inet6_dev pointer
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@...gle.com>
Cc: Lorenzo Colitti <lorenzo@...gle.com>
Cc: David Ahern <dsahern@...nel.org>
Signed-off-by: Patrick Rohr <prohr@...gle.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
Powered by blists - more mailing lists