Skip to contentSkip to conversation

net: release reference to inet6_dev pointer

netdev-next Patrick Rohr 3 participants 3 messages Aug 16, 2023 – Aug 18, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
Cc Lorenzo Colitti <[email protected]>
Cc David Ahern <[email protected]>
---
 net/ipv6/addrconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/addrconf.c +1 -1
index 5184bd0ceb12..47d1dd8501b7 100644
@@ -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:
Signature · 1 line
2.41.0.694.ge786442a9b-goog
reviewer Reviewed-by
#1 lore raw
Quoted 8 lines · Patrick Rohr

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 <[email protected]>
Cc Lorenzo Colitti <[email protected]>
Cc David Ahern <[email protected]>

Hi Patrick,

this patch looks good to me, but unfortunately our CI got a bit confused and tried to apply it to net, where it does not apply because the cited commit is not present there, rather than net-next, where it does apply. This creates a process issue for us.

I think it would be useful if you could repost the patch with it targeted at net-next:

Subject: [PATCH net-next] ...

Please feel free to include:

Signature · 1 line
pw-bot: changes-requested