Skip to content

Commit d3b6f61

Browse files
Eric Dumazetdavem330
authored andcommitted
ip_tunnel: remove __net_init/exit from exported functions
If CONFIG_NET_NS is not set then __net_init is the same as __init and __net_exit is the same as __exit. These functions will be removed from memory after the module loads or is removed. Functions that are exported for use by other functions should never be labeled for removal. Bug introduced by commit c544193 ("GRE: Refactor GRE tunneling code.") Reported-by: Steinar H. Gunderson <[email protected]> Signed-off-by: Steven Rostedt <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cc60ab0 commit d3b6f61

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/net/ip_tunnels.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ struct ip_tunnel_net {
9595
int ip_tunnel_init(struct net_device *dev);
9696
void ip_tunnel_uninit(struct net_device *dev);
9797
void ip_tunnel_dellink(struct net_device *dev, struct list_head *head);
98-
int __net_init ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
99-
struct rtnl_link_ops *ops, char *devname);
98+
int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
99+
struct rtnl_link_ops *ops, char *devname);
100100

101-
void __net_exit ip_tunnel_delete_net(struct ip_tunnel_net *itn);
101+
void ip_tunnel_delete_net(struct ip_tunnel_net *itn);
102102

103103
void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
104104
const struct iphdr *tnl_params);

net/ipv4/ip_tunnel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ void ip_tunnel_dellink(struct net_device *dev, struct list_head *head)
853853
}
854854
EXPORT_SYMBOL_GPL(ip_tunnel_dellink);
855855

856-
int __net_init ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
856+
int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id,
857857
struct rtnl_link_ops *ops, char *devname)
858858
{
859859
struct ip_tunnel_net *itn = net_generic(net, ip_tnl_net_id);
@@ -899,7 +899,7 @@ static void ip_tunnel_destroy(struct ip_tunnel_net *itn, struct list_head *head)
899899
unregister_netdevice_queue(itn->fb_tunnel_dev, head);
900900
}
901901

902-
void __net_exit ip_tunnel_delete_net(struct ip_tunnel_net *itn)
902+
void ip_tunnel_delete_net(struct ip_tunnel_net *itn)
903903
{
904904
LIST_HEAD(list);
905905

0 commit comments

Comments
 (0)