[Devel] [PATCH RHEL7 COMMIT] venet: fix false positive return code in case of error in venet_init()

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 20 07:56:35 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.9
------>
commit bad1935c97f94092edd129d15ac7d73ccc0e1115
Author: Stanislav Kinsburskiy <skinsbursky at odin.com>
Date:   Tue Sep 22 17:49:12 2015 +0400

    venet: fix false positive return code in case of error in venet_init()
    
    Patchset description:
    This series add venet device creation and destruction support via netlink.
    It also removes device creation via per-net init hook.
    
    https://jira.sw.ru/browse/PSBM-23441
    
    v3: -ENOTSUP replaced with -ENOSYS. -ENOTSUP doesn't exist.
    
    v2: return -ENOTSUP in case of attempt to create a venet device in nested
    namespace.
    
    Stanislav Kinsburskiy (3):
          venet: fix false positive return code in case of error in venet_init()
          venet: add newlink and dellink callbacks to rtnetlink operations
          venet: remove per-net hooks and related code
    
    =====================================
    This patch description:
    
    It's set to 0 few lines above.
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at parallels.com>
    Acked-by: Andrew Vagin <avagin at odin.com>
---
 drivers/net/venetdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c
index d16ac3d..50b3c91 100644
--- a/drivers/net/venetdev.c
+++ b/drivers/net/venetdev.c
@@ -1230,8 +1230,10 @@ __init int venet_init(void)
 
 	de = proc_create("veip", S_IFREG | S_IRUSR, proc_vz_dir,
 			&proc_veip_operations);
-	if (!de)
+	if (!de) {
+		err = -EINVAL;
 		goto err_proc;
+	}
 
 	err = cgroup_add_cftypes(&ve_subsys, venet_cftypes);
 	if (err)



More information about the Devel mailing list