diff options
| -rw-r--r-- | include/net/inetpeer.h | 3 | ||||
| -rw-r--r-- | net/ipv4/inetpeer.c | 10 | ||||
| -rw-r--r-- | net/ipv4/route.c | 4 | ||||
| -rw-r--r-- | net/ipv6/route.c | 2 |
4 files changed, 5 insertions, 14 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 5a96c8edc52..733edc641b7 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
| @@ -113,8 +113,7 @@ static inline struct inet_peer *inet_getpeer_v6(struct net *net, | |||
| 113 | extern void inet_putpeer(struct inet_peer *p); | 113 | extern void inet_putpeer(struct inet_peer *p); |
| 114 | extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); | 114 | extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); |
| 115 | 115 | ||
| 116 | extern void __inetpeer_invalidate_tree(struct inet_peer_base *); | 116 | extern void inetpeer_invalidate_tree(struct inet_peer_base *); |
| 117 | extern void inetpeer_invalidate_tree(struct net *net, int family); | ||
| 118 | 117 | ||
| 119 | /* | 118 | /* |
| 120 | * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, | 119 | * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index d0d72f89b27..9d89a381f0e 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
| @@ -564,7 +564,7 @@ static void inetpeer_inval_rcu(struct rcu_head *head) | |||
| 564 | schedule_delayed_work(&gc_work, gc_delay); | 564 | schedule_delayed_work(&gc_work, gc_delay); |
| 565 | } | 565 | } |
| 566 | 566 | ||
| 567 | void __inetpeer_invalidate_tree(struct inet_peer_base *base) | 567 | void inetpeer_invalidate_tree(struct inet_peer_base *base) |
| 568 | { | 568 | { |
| 569 | struct inet_peer *old, *new, *prev; | 569 | struct inet_peer *old, *new, *prev; |
| 570 | 570 | ||
| @@ -585,12 +585,4 @@ void __inetpeer_invalidate_tree(struct inet_peer_base *base) | |||
| 585 | out: | 585 | out: |
| 586 | write_sequnlock_bh(&base->lock); | 586 | write_sequnlock_bh(&base->lock); |
| 587 | } | 587 | } |
| 588 | EXPORT_SYMBOL(__inetpeer_invalidate_tree); | ||
| 589 | |||
| 590 | void inetpeer_invalidate_tree(struct net *net, int family) | ||
| 591 | { | ||
| 592 | struct inet_peer_base *base = family_to_base(net, family); | ||
| 593 | |||
| 594 | __inetpeer_invalidate_tree(base); | ||
| 595 | } | ||
| 596 | EXPORT_SYMBOL(inetpeer_invalidate_tree); | 588 | EXPORT_SYMBOL(inetpeer_invalidate_tree); |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4cd35c3904d..cf78343940d 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -935,7 +935,7 @@ static void rt_cache_invalidate(struct net *net) | |||
| 935 | 935 | ||
| 936 | get_random_bytes(&shuffle, sizeof(shuffle)); | 936 | get_random_bytes(&shuffle, sizeof(shuffle)); |
| 937 | atomic_add(shuffle + 1U, &net->ipv4.rt_genid); | 937 | atomic_add(shuffle + 1U, &net->ipv4.rt_genid); |
| 938 | inetpeer_invalidate_tree(net, AF_INET); | 938 | inetpeer_invalidate_tree(net->ipv4.peers); |
| 939 | } | 939 | } |
| 940 | 940 | ||
| 941 | /* | 941 | /* |
| @@ -3401,7 +3401,7 @@ static void __net_exit ipv4_inetpeer_exit(struct net *net) | |||
| 3401 | struct inet_peer_base *bp = net->ipv4.peers; | 3401 | struct inet_peer_base *bp = net->ipv4.peers; |
| 3402 | 3402 | ||
| 3403 | net->ipv4.peers = NULL; | 3403 | net->ipv4.peers = NULL; |
| 3404 | __inetpeer_invalidate_tree(bp); | 3404 | inetpeer_invalidate_tree(bp); |
| 3405 | kfree(bp); | 3405 | kfree(bp); |
| 3406 | } | 3406 | } |
| 3407 | 3407 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 3e1e4e0da09..7f346d7492d 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -3012,7 +3012,7 @@ static void __net_exit ipv6_inetpeer_exit(struct net *net) | |||
| 3012 | struct inet_peer_base *bp = net->ipv6.peers; | 3012 | struct inet_peer_base *bp = net->ipv6.peers; |
| 3013 | 3013 | ||
| 3014 | net->ipv6.peers = NULL; | 3014 | net->ipv6.peers = NULL; |
| 3015 | __inetpeer_invalidate_tree(bp); | 3015 | inetpeer_invalidate_tree(bp); |
| 3016 | kfree(bp); | 3016 | kfree(bp); |
| 3017 | } | 3017 | } |
| 3018 | 3018 | ||
