[Devel] [PATCH RH9 01/26] connector: store all private data on VE structure
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Thu Oct 7 15:53:41 MSK 2021
From: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
This is needed to containerize connector and its proc part.
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
(cherry picked from vz8 commit eda754aba8a4ba5d2be0a27a664e86c85e382869)
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
include/linux/connector.h | 9 +++++++++
include/linux/ve.h | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 487350bb19c3..c3bc18eee9f6 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -54,6 +54,15 @@ struct cn_dev {
struct cn_queue_dev *cbdev;
};
+struct cn_private {
+ struct cn_dev cdev;
+ int cn_already_initialized;
+
+ atomic_t proc_event_num_listeners;
+ u32 __percpu *proc_event_counts;
+
+};
+
/**
* cn_add_callback() - Registers new callback with connector core.
*
diff --git a/include/linux/ve.h b/include/linux/ve.h
index 3d5a1dc2ed0d..6ee5a6377e34 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -23,6 +23,7 @@
struct nsproxy;
struct veip_struct;
struct user_namespace;
+struct cn_private;
struct ve_struct {
struct cgroup_subsys_state css;
@@ -77,6 +78,9 @@ struct ve_struct {
#ifdef CONFIG_COREDUMP
char core_pattern[CORENAME_MAX_SIZE];
#endif
+#ifdef CONFIG_CONNECTOR
+ struct cn_private *cn;
+#endif
struct kthread_worker *kthreadd_worker;
struct task_struct *kthreadd_task;
--
2.31.1
More information about the Devel
mailing list