Skip to content

Commit

Permalink
net: fix building errors on powerpc when CONFIG_RETPOLINE is not set
Browse files Browse the repository at this point in the history
This commit fixes the errores reported when building for powerpc:

 ERROR: modpost: "ip6_dst_check" [vmlinux] is a static EXPORT_SYMBOL
 ERROR: modpost: "ipv4_dst_check" [vmlinux] is a static EXPORT_SYMBOL
 ERROR: modpost: "ipv4_mtu" [vmlinux] is a static EXPORT_SYMBOL
 ERROR: modpost: "ip6_mtu" [vmlinux] is a static EXPORT_SYMBOL

Fixes: f67fbea ("net: use indirect call helpers for dst_mtu")
Fixes: bbd807d ("net: indirect call helpers for ipv4/ipv6 dst_check functions")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Brian Vazquez <brianvv@google.com>
Link: https://lore.kernel.org/r/20210204181839.558951-2-brianvv@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Brian Vazquez authored and Jakub Kicinski committed Feb 5, 2021
1 parent 0053859 commit 9c97921
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry *ipv4_dst_check(struct dst_entry *dst,
return NULL;
return dst;
}
EXPORT_SYMBOL(ipv4_dst_check);
EXPORT_INDIRECT_CALLABLE(ipv4_dst_check);

static void ipv4_send_dest_unreach(struct sk_buff *skb)
{
Expand Down Expand Up @@ -1337,7 +1337,7 @@ INDIRECT_CALLABLE_SCOPE unsigned int ipv4_mtu(const struct dst_entry *dst)

return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
}
EXPORT_SYMBOL(ipv4_mtu);
EXPORT_INDIRECT_CALLABLE(ipv4_mtu);

static void ip_del_fnhe(struct fib_nh_common *nhc, __be32 daddr)
{
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2644,7 +2644,7 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry *ip6_dst_check(struct dst_entry *dst,

return dst_ret;
}
EXPORT_SYMBOL(ip6_dst_check);
EXPORT_INDIRECT_CALLABLE(ip6_dst_check);

static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
{
Expand Down Expand Up @@ -3115,7 +3115,7 @@ INDIRECT_CALLABLE_SCOPE unsigned int ip6_mtu(const struct dst_entry *dst)

return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
}
EXPORT_SYMBOL(ip6_mtu);
EXPORT_INDIRECT_CALLABLE(ip6_mtu);

/* MTU selection:
* 1. mtu on route is locked - use it
Expand Down

0 comments on commit 9c97921

Please sign in to comment.