mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Revert "ipv6: release nexthop on device removal"
This reverts commit b2f26a27ea which is
commit eb02688c5c45c3e7af7e71f036a7144f5639cbfe upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ied6f94415d8fc58e59fa2bbc15871fb6848cab17
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -378,7 +378,6 @@ static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
|
||||
{
|
||||
struct rt6_info *rt = (struct rt6_info *)dst;
|
||||
struct inet6_dev *idev = rt->rt6i_idev;
|
||||
struct fib6_info *from;
|
||||
|
||||
if (idev && idev->dev != blackhole_netdev) {
|
||||
struct inet6_dev *blackhole_idev = in6_dev_get(blackhole_netdev);
|
||||
@@ -388,8 +387,6 @@ static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
|
||||
in6_dev_put(idev);
|
||||
}
|
||||
}
|
||||
from = unrcu_pointer(xchg(&rt->from, NULL));
|
||||
fib6_info_release(from);
|
||||
}
|
||||
|
||||
static bool __rt6_check_expired(const struct rt6_info *rt)
|
||||
@@ -1452,6 +1449,7 @@ static DEFINE_SPINLOCK(rt6_exception_lock);
|
||||
static void rt6_remove_exception(struct rt6_exception_bucket *bucket,
|
||||
struct rt6_exception *rt6_ex)
|
||||
{
|
||||
struct fib6_info *from;
|
||||
struct net *net;
|
||||
|
||||
if (!bucket || !rt6_ex)
|
||||
@@ -1463,6 +1461,8 @@ static void rt6_remove_exception(struct rt6_exception_bucket *bucket,
|
||||
/* purge completely the exception to allow releasing the held resources:
|
||||
* some [sk] cache may keep the dst around for unlimited time
|
||||
*/
|
||||
from = unrcu_pointer(xchg(&rt6_ex->rt6i->from, NULL));
|
||||
fib6_info_release(from);
|
||||
dst_dev_put(&rt6_ex->rt6i->dst);
|
||||
|
||||
hlist_del_rcu(&rt6_ex->hlist);
|
||||
|
||||
Reference in New Issue
Block a user