[Devel] [PATCH RHEL7 COMMIT] connector: containerize "connector" proc entry

Konstantin Khorenko khorenko at virtuozzo.com
Thu Aug 31 17:40:43 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.5
------>
commit 2100a680437f0c26d65ab4e304cc274399ccbcf3
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Thu Aug 31 17:40:43 2017 +0300

    connector: containerize "connector" proc entry
    
    Needed to expose "/proc/net/connector" in CT and show right content.
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
    Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 drivers/connector/connector.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 59d81a3..771dadf 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -241,7 +241,7 @@ EXPORT_SYMBOL_GPL(cn_del_callback);
 
 static int cn_proc_show(struct seq_file *m, void *v)
 {
-	struct cn_queue_dev *dev = get_cdev(get_ve0())->cbdev;
+	struct cn_queue_dev *dev = get_cdev(get_exec_env())->cbdev;
 	struct cn_callback_entry *cbq;
 
 	seq_printf(m, "Name            ID\n");
@@ -303,7 +303,7 @@ static int cn_init_ve(struct ve_struct *ve)
 
 	ve->cn->cn_already_initialized = 1;
 
-	if (!proc_create("connector", S_IRUGO, net->proc_net, &cn_file_ops)) {
+	if (!proc_net_create("connector", S_IRUGO, net->proc_net, &cn_file_ops)) {
 		err = -ENOMEM;
 		goto free_cdev;
 	}


More information about the Devel mailing list