[Devel] [PATCH RHEL9 COMMIT] proc connector: update cookies type to be able to store pointer
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Jul 23 22:17:58 MSK 2025
The commit is pushed to "branch-rh9-5.14.0-427.77.1.vz9.86.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.77.1.vz9.86.1
------>
commit c938b28abbb3f6a72afd5b01fbd6b50f037ad864
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Mon Jul 21 14:29:25 2025 +0300
proc connector: update cookies type to be able to store pointer
We need to provide struct pid pointer to fill_exit_event(),
so update cookie arg type of proc_event_connector() and all filler
functions to long.
https://virtuozzo.atlassian.net/browse/PSBM-161075
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Feature: cgroup: control group rules daemon (cgrulesengd) virtualization
---
drivers/connector/cn_proc.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
index 16091278ebb3d..3349b6336e9ff 100644
--- a/drivers/connector/cn_proc.c
+++ b/drivers/connector/cn_proc.c
@@ -74,11 +74,11 @@ static inline void send_msg_ve(struct ve_struct *ve, struct cn_msg *msg)
static struct cn_msg *cn_msg_fill(__u8 *buffer, struct ve_struct *ve,
struct task_struct *task,
- int what, int cookie,
+ int what, long cookie,
bool (*fill_event)(struct proc_event *ev,
struct ve_struct *ve,
struct task_struct *task,
- int cookie))
+ long cookie))
{
struct cn_msg *msg;
struct proc_event *ev;
@@ -107,11 +107,11 @@ static int proc_event_num_listeners(struct ve_struct *ve)
static void proc_event_connector_ve(struct task_struct *task,
struct ve_struct *ve,
- int what, int cookie,
+ int what, long cookie,
bool (*fill_event)(struct proc_event *ev,
struct ve_struct *ve,
struct task_struct *task,
- int cookie))
+ long cookie))
{
struct cn_msg *msg;
__u8 buffer[CN_PROC_MSG_SIZE] __aligned(8);
@@ -128,11 +128,11 @@ static void proc_event_connector_ve(struct task_struct *task,
}
static void proc_event_connector(struct task_struct *task,
- int what, int cookie,
+ int what, long cookie,
bool (*fill_event)(struct proc_event *ev,
struct ve_struct *ve,
struct task_struct *task,
- int cookie))
+ long cookie))
{
struct ve_struct *ve = task->task_ve;
@@ -143,7 +143,7 @@ static void proc_event_connector(struct task_struct *task,
}
static bool fill_fork_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int unused)
+ struct task_struct *task, long unused)
{
struct task_struct *parent;
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
@@ -164,7 +164,7 @@ void proc_fork_connector(struct task_struct *task)
}
static bool fill_exec_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int unused)
+ struct task_struct *task, long unused)
{
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
@@ -179,7 +179,7 @@ void proc_exec_connector(struct task_struct *task)
}
static bool fill_id_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int which_id)
+ struct task_struct *task, long which_id)
{
const struct cred *cred;
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
@@ -209,7 +209,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
}
static bool fill_sid_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int unused)
+ struct task_struct *task, long unused)
{
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
@@ -224,7 +224,7 @@ void proc_sid_connector(struct task_struct *task)
}
static bool fill_ptrace_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int ptrace_id)
+ struct task_struct *task, long ptrace_id)
{
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
@@ -248,7 +248,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
}
static bool fill_comm_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int unused)
+ struct task_struct *task, long unused)
{
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
@@ -264,7 +264,7 @@ void proc_comm_connector(struct task_struct *task)
}
static bool fill_coredump_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int unused)
+ struct task_struct *task, long unused)
{
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
struct task_struct *parent;
@@ -292,7 +292,7 @@ void proc_coredump_connector(struct task_struct *task)
}
static bool fill_exit_event(struct proc_event *ev, struct ve_struct *ve,
- struct task_struct *task, int unused)
+ struct task_struct *task, long unused)
{
struct pid_namespace *pid_ns = ve->ve_ns->pid_ns_for_children;
struct task_struct *parent;
More information about the Devel
mailing list