Skip to contentSkip to conversation

ipv6: remove obsolete EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL()

PATCH Applied Eric Dumazet 3 participants 3 messages Jun 4 – Jun 6

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

PATCH 1/1 ipv6: remove obsolete EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL()

These symbols don't need to be exported, they are only used from vmlinux:

- inet6addr_notifier_call_chain
- inet6addr_validator_notifier_call_chain
- in6addr_linklocal_allnodes
- in6addr_linklocal_allrouters
- in6addr_interfacelocal_allnodes
- in6addr_interfacelocal_allrouters
- in6addr_sitelocal_allrouters
- inet6_cleanup_sock
- ip6_sk_dst_lookup_flow
- ipv6_proxy_select_ident
- ip6_sk_update_pmtu
- ip6_sk_redirect

---
 net/ipv6/addrconf_core.c | 6 ------
 net/ipv6/af_inet6.c      | 1 -
 net/ipv6/ip6_output.c    | 1 -
 net/ipv6/output_core.c   | 1 -
 net/ipv6/route.c         | 2 --
 5 files changed, 11 deletions(-)
net/ipv6/addrconf_core.c +0 -6
index fa27a90ab3cdd4daacbc88e2fba2f3b2419d503a..29095c90aa16b19fcb7a7fff1d5b99c2150563aa 100644
@@ -107,7 +107,6 @@ int inet6addr_notifier_call_chain(unsigned long val, void *v)
 {
 	return atomic_notifier_call_chain(&inet6addr_chain, val, v);
 }
-EXPORT_SYMBOL(inet6addr_notifier_call_chain);
 
 int register_inet6addr_validator_notifier(struct notifier_block *nb)
 {
@@ -126,7 +125,6 @@ int inet6addr_validator_notifier_call_chain(unsigned long val, void *v)
 {
 	return blocking_notifier_call_chain(&inet6addr_validator_chain, val, v);
 }
-EXPORT_SYMBOL(inet6addr_validator_notifier_call_chain);
 
 /* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */
 const struct in6_addr in6addr_loopback __aligned(BITS_PER_LONG/8)
@@ -140,16 +138,12 @@ const struct in6_addr in6addr_linklocal_allnodes __aligned(BITS_PER_LONG/8)
 EXPORT_SYMBOL(in6addr_linklocal_allnodes);
 const struct in6_addr in6addr_linklocal_allrouters __aligned(BITS_PER_LONG/8)
 	= IN6ADDR_LINKLOCAL_ALLROUTERS_INIT;
-EXPORT_SYMBOL(in6addr_linklocal_allrouters);
 const struct in6_addr in6addr_interfacelocal_allnodes __aligned(BITS_PER_LONG/8)
 	= IN6ADDR_INTERFACELOCAL_ALLNODES_INIT;
-EXPORT_SYMBOL(in6addr_interfacelocal_allnodes);
 const struct in6_addr in6addr_interfacelocal_allrouters __aligned(BITS_PER_LONG/8)
 	= IN6ADDR_INTERFACELOCAL_ALLROUTERS_INIT;
-EXPORT_SYMBOL(in6addr_interfacelocal_allrouters);
 const struct in6_addr in6addr_sitelocal_allrouters __aligned(BITS_PER_LONG/8)
 	= IN6ADDR_SITELOCAL_ALLROUTERS_INIT;
-EXPORT_SYMBOL(in6addr_sitelocal_allrouters);
 
 static void snmp6_free_dev(struct inet6_dev *idev)
 {
net/ipv6/af_inet6.c +0 -1
index 0a88b376141d70217d96976b7230fd4a34519d43..b6a794f6c042ab8de2ba4f0fa56ad9ebe7f9d243 100644
@@ -498,7 +498,6 @@ void inet6_cleanup_sock(struct sock *sk)
 		txopt_put(opt);
 	}
 }
-EXPORT_SYMBOL_GPL(inet6_cleanup_sock);
 
 /*
  *	This does both peername and sockname.
net/ipv6/ip6_output.c +0 -1
index c14adcdd43960ddd8856a7ab2f9775589a4f79c0..9f1e0e4f74641550ddc08136e93a0cd283fa4c92 100644
@@ -1332,7 +1332,6 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
 
 	return dst;
 }
-EXPORT_SYMBOL_GPL(ip6_sk_dst_lookup_flow);
 
 static inline struct ipv6_opt_hdr *ip6_opt_dup(struct ipv6_opt_hdr *src,
 					       gfp_t gfp)
net/ipv6/output_core.c +0 -1
index 64b1eeb79b572b8b412c60f832c4a7984ac8276f..418f21d24fb80fec094be8097fbab3e85b31b9a1 100644
@@ -42,7 +42,6 @@ __be32 ipv6_proxy_select_ident(struct net *net, struct sk_buff *skb)
 	id = __ipv6_select_ident(net, &addrs[1], &addrs[0]);
 	return htonl(id);
 }
-EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
 
 __be32 ipv6_select_ident(struct net *net,
 			 const struct in6_addr *daddr,
net/ipv6/route.c +0 -2
index 636f0120d7e38d6d7f07b43ee6673c56e77471aa..8259c7527aa4cd1ff5709ea24cf4ab7b729c52b6 100644
@@ -3044,7 +3044,6 @@ void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu)
 		ip6_datagram_dst_update(sk, false);
 	bh_unlock_sock(sk);
 }
-EXPORT_SYMBOL_GPL(ip6_sk_update_pmtu);
 
 void ip6_sk_dst_store_flow(struct sock *sk, struct dst_entry *dst,
 			   const struct flowi6 *fl6)
@@ -3255,7 +3254,6 @@ void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk)
 	ip6_redirect(skb, sock_net(sk), sk->sk_bound_dev_if,
 		     READ_ONCE(sk->sk_mark), sk_uid(sk));
 }
-EXPORT_SYMBOL_GPL(ip6_sk_redirect);
 
 static unsigned int ip6_default_advmss(const struct dst_entry *dst)
 {
Signature · 1 line
2.54.0.1032.g2f8565e1d1-goog
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Eric Dumazet

These symbols don't need to be exported, they are only used from vmlinux:

- inet6addr_notifier_call_chain
- inet6addr_validator_notifier_call_chain
- in6addr_linklocal_allnodes
- in6addr_linklocal_allrouters
- in6addr_interfacelocal_allnodes
- in6addr_interfacelocal_allrouters
- in6addr_sitelocal_allrouters
- inet6_cleanup_sock
- ip6_sk_dst_lookup_flow
- ipv6_proxy_select_ident
- ip6_sk_update_pmtu
- ip6_sk_redirect

Quoted 9 lines
---
 net/ipv6/addrconf_core.c | 6 ------
 net/ipv6/af_inet6.c      | 1 -
 net/ipv6/ip6_output.c    | 1 -
 net/ipv6/output_core.c   | 1 -
 net/ipv6/route.c         | 2 --
 5 files changed, 11 deletions(-)
#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 15 lines · On Thu, 4 Jun 2026 17:45:55 +0000 you wrote:

These symbols don't need to be exported, they are only used from vmlinux:

- inet6addr_notifier_call_chain
- inet6addr_validator_notifier_call_chain
- in6addr_linklocal_allnodes
- in6addr_linklocal_allrouters
- in6addr_interfacelocal_allnodes
- in6addr_interfacelocal_allrouters
- in6addr_sitelocal_allrouters
- inet6_cleanup_sock
- ip6_sk_dst_lookup_flow
- ipv6_proxy_select_ident
- ip6_sk_update_pmtu
- ip6_sk_redirect

Quoted 1 line

[...]

Here is the summary with links:
- [net-next] ipv6: remove obsolete EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL()

    https://git.kernel.org/netdev/net-next/c/9410fb4da2d4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html