Commit fce94e16 authored by Patrick Rohr's avatar Patrick Rohr Committed by Zhengchao Shao
Browse files

net: release reference to inet6_dev pointer

stable inclusion
from stable-v5.10.199
commit 014cab5329d18524749dacc25923938aab14ff57
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9K8D1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=014cab5329d18524749dacc25923938aab14ff57



--------------------------------

commit 5cb24968 upstream.

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

Fixes: 5027d54a ("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: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarMaciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarPatrick Rohr <prohr@google.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 44f2bed4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2748,7 +2748,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: