[Devel] [PATCH 1/5] kmod: fix build without CONFIG_VE_IPTABLES

Dmitry Safonov dsafonov at odin.com
Mon Jan 18 02:27:49 PST 2016


Fix the following:
kernel/kmod.c:395:6: error: redefinition of ‘module_payload_allowed’
 bool module_payload_allowed(const char *module)
      ^
In file included from include/linux/module.h:13:0,
                 from kernel/kmod.c:21:
include/linux/kmod.h:50:20: note: previous definition of ‘module_payload_allowed’ was here
 static inline bool module_payload_allowed(const char *module) { return true; }

Signed-off-by: Dmitry Safonov <dsafonov at odin.com>
---
 kernel/kmod.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/kmod.c b/kernel/kmod.c
index b5bf38df..26b0c33 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -375,12 +375,6 @@ static inline int module_payload_iptable_allowed(const char *module)
 	return -1;
 }
 
-#else  /* CONFIG_VE_IPTABLES */
-
-#define module_payload_iptable_allowed(module) -1
-
-#endif /* CONFIG_VE_IPTABLES */
-
 /* ve0 allowed modules */
 static const char * const ve0_allowed_mod[] = {
 	"binfmt_misc"
@@ -412,6 +406,8 @@ bool module_payload_allowed(const char *module)
 	return false;
 }
 
+#endif
+
 int __request_module(bool wait, const char *fmt, ...)
 {
 	char module_name[MODULE_NAME_LEN];
-- 
2.7.0



More information about the Devel mailing list