[Devel] [PATCH RHEL7 COMMIT] ve/kmod: fix build without CONFIG_VE_IPTABLES

Konstantin Khorenko khorenko at virtuozzo.com
Sat Jan 23 04:58:46 PST 2016


The commit is pushed to "branch-rh7-3.10.0-327.3.1-vz7.10.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.3.1.vz7.10.3
------>
commit 298d7096413cb7d13d945dae4f4d61e4a7ba57ec
Author: Dmitry Safonov <dsafonov at virtuozzo.com>
Date:   Sat Jan 23 16:58:38 2016 +0400

    ve/kmod: fix build without CONFIG_VE_IPTABLES
    
    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; }
    
    Fixes f69aa25a82ac63ade637c3c115dd6b99f8f12f80
    ("ve/kmod: list of allowed to autoload in CT modules").
    
    Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.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];


More information about the Devel mailing list