[Devel] [PATCH RH9 24/26] connector: containerize "connector" proc entry

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Oct 7 15:54:04 MSK 2021


From: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>

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>

(cherry picked from vz8 commit dc2514140f30bcb500b3991727ba3c2149927dce)
Signed-off-by: Pavel Tikhomirov <ptikhomirov 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 ddb690e901d7..952a21603bdc 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -253,7 +253,7 @@ EXPORT_SYMBOL_GPL(cn_del_callback);
 
 static int __maybe_unused 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");
@@ -307,7 +307,7 @@ static int cn_init_ve(struct ve_struct *ve)
 
 	ve->cn->cn_already_initialized = 1;
 
-	if (!proc_create_single("connector", S_IRUGO, net->proc_net,
+	if (!proc_net_create_single("connector", S_IRUGO, net->proc_net,
 				cn_proc_show)) {
 		err = -ENOMEM;
 		goto free_cdev;
-- 
2.31.1



More information about the Devel mailing list