diff mbox series

[net-next] fib: fix another fib_rules_ops indirect call wrapper problem

Message ID 20200801030110.747164-1-brianvv@google.com
State Accepted
Delegated to: David Miller
Headers show
Series [net-next] fib: fix another fib_rules_ops indirect call wrapper problem | expand

Commit Message

Brian Vazquez Aug. 1, 2020, 3:01 a.m. UTC
It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops
indirect calls wrappers") I forgot to include the case when
CONFIG_IP_MULTIPLE_TABLES is not set.

Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Brian Vazquez <brianvv@google.com>
---
 net/core/fib_rules.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Randy Dunlap Aug. 1, 2020, 3:52 a.m. UTC | #1
On 7/31/20 8:01 PM, Brian Vazquez wrote:
> It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops
> indirect calls wrappers") I forgot to include the case when
> CONFIG_IP_MULTIPLE_TABLES is not set.
> 
> Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Brian Vazquez <brianvv@google.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  net/core/fib_rules.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
> index fce645f6b9b10..a7a3f500a857b 100644
> --- a/net/core/fib_rules.c
> +++ b/net/core/fib_rules.c
> @@ -17,10 +17,16 @@
>  #include <linux/indirect_call_wrapper.h>
>  
>  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
> +#ifdef CONFIG_IP_MULTIPLE_TABLES
>  #define INDIRECT_CALL_MT(f, f2, f1, ...) \
>  	INDIRECT_CALL_INET(f, f2, f1, __VA_ARGS__)
>  #else
> +#define INDIRECT_CALL_MT(f, f2, f1, ...) INDIRECT_CALL_1(f, f2, __VA_ARGS__)
> +#endif
> +#elif CONFIG_IP_MULTIPLE_TABLES
>  #define INDIRECT_CALL_MT(f, f2, f1, ...) INDIRECT_CALL_1(f, f1, __VA_ARGS__)
> +#else
> +#define INDIRECT_CALL_MT(f, f2, f1, ...) f(__VA_ARGS__)
>  #endif
>  
>  static const struct fib_kuid_range fib_kuid_range_unset = {
>
David Miller Aug. 1, 2020, 6:47 p.m. UTC | #2
From: Brian Vazquez <brianvv@google.com>
Date: Fri, 31 Jul 2020 20:01:10 -0700

> It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops
> indirect calls wrappers") I forgot to include the case when
> CONFIG_IP_MULTIPLE_TABLES is not set.
> 
> Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Brian Vazquez <brianvv@google.com>

Applied.
diff mbox series

Patch

diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index fce645f6b9b10..a7a3f500a857b 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -17,10 +17,16 @@ 
 #include <linux/indirect_call_wrapper.h>
 
 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
+#ifdef CONFIG_IP_MULTIPLE_TABLES
 #define INDIRECT_CALL_MT(f, f2, f1, ...) \
 	INDIRECT_CALL_INET(f, f2, f1, __VA_ARGS__)
 #else
+#define INDIRECT_CALL_MT(f, f2, f1, ...) INDIRECT_CALL_1(f, f2, __VA_ARGS__)
+#endif
+#elif CONFIG_IP_MULTIPLE_TABLES
 #define INDIRECT_CALL_MT(f, f2, f1, ...) INDIRECT_CALL_1(f, f1, __VA_ARGS__)
+#else
+#define INDIRECT_CALL_MT(f, f2, f1, ...) f(__VA_ARGS__)
 #endif
 
 static const struct fib_kuid_range fib_kuid_range_unset = {