diff mbox series

[net-next,v2] net: release reference to inet6_dev pointer

Message ID 20230818182249.3348910-1-prohr@google.com (mailing list archive)
State Accepted
Commit 5cb249686e67dbef3ffe53887fa725eefc5a7144
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] net: release reference to inet6_dev pointer | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1330 this patch: 1330
netdev/cc_maintainers fail 1 blamed authors not CCed: kuba@kernel.org; 3 maintainers not CCed: kuba@kernel.org edumazet@google.com pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1353 this patch: 1353
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Patrick Rohr Aug. 18, 2023, 6:22 p.m. UTC
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>
Cc: Simon Horman <horms@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Patrick Rohr <prohr@google.com>
---
 net/ipv6/addrconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Aug. 19, 2023, 4:34 p.m. UTC | #1
On Fri, Aug 18, 2023 at 11:22:49AM -0700, Patrick Rohr wrote:
> 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>
> Cc: Simon Horman <horms@kernel.org>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Reviewed-by: Maciej Żenczykowski <maze@google.com>
> Signed-off-by: Patrick Rohr <prohr@google.com>
> ---
>  net/ipv6/addrconf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Aug. 20, 2023, 6:13 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 18 Aug 2023 11:22:49 -0700 you wrote:
> 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>
> Cc: Simon Horman <horms@kernel.org>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Reviewed-by: Maciej Żenczykowski <maze@google.com>
> Signed-off-by: Patrick Rohr <prohr@google.com>
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: release reference to inet6_dev pointer
    https://git.kernel.org/netdev/net-next/c/5cb249686e67

You are awesome, thank you!
diff mbox series

Patch

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: