Re: linux-next: build failure after merge of the net-next tree

From: Joachim Wiberg
Date: Thu Feb 04 2021 - 07:20:26 EST


Hi everyone,

On Thu, Feb 04, 2021 at 20:38, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
> On Wed, 3 Feb 2021 19:52:08 -0800 Brian Vazquez <brianvv@xxxxxxxxxx> wrote:
>> Hi Stephen, thanks for the report. I'm having trouble trying to
>> compile for ppc, but I believe this should fix the problem, could you
>> test this patch, please? Thanks!
> That fixed it, thanks (though the patch was badly wrapped and
> whitespace damaged :-))

can confirm, that patch fixes building from latest net-next also for me.

Here's an updated version.

Regards
/Joachim

diff --git a/include/linux/indirect_call_wrapper.h b/include/linux/indirect_call_wrapper.h
index 54c02c84906a..551e515b405b 100644
--- a/include/linux/indirect_call_wrapper.h
+++ b/include/linux/indirect_call_wrapper.h
@@ -36,6 +36,7 @@

#define INDIRECT_CALLABLE_DECLARE(f) f
#define INDIRECT_CALLABLE_SCOPE
+#define INDIRECT_CALLABLE_EXPORT(f) EXPORT_SYMBOL(f)

#else
#define INDIRECT_CALL_1(f, f1, ...) f(__VA_ARGS__)
@@ -44,6 +45,7 @@
#define INDIRECT_CALL_4(f, f4, f3, f2, f1, ...) f(__VA_ARGS__)
#define INDIRECT_CALLABLE_DECLARE(f)
#define INDIRECT_CALLABLE_SCOPE static
+#define INDIRECT_CALLABLE_EXPORT(f)
#endif

/*
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9e6537709794..9dd8ff3887b7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -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);
+INDIRECT_CALLABLE_EXPORT(ipv4_dst_check);

static void ipv4_send_dest_unreach(struct sk_buff *skb)
{
@@ -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);
+INDIRECT_CALLABLE_EXPORT(ipv4_mtu);

static void ip_del_fnhe(struct fib_nh_common *nhc, __be32 daddr)
{
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8d9e053dc071..f0e9b07b92b7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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);
+INDIRECT_CALLABLE_EXPORT(ip6_dst_check);

static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
{
@@ -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);
+INDIRECT_CALLABLE_EXPORT(ip6_mtu);

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