[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210701133458epcms1p68e9eb9bd0eee8903ba26679a37d9d960@epcms1p6>
Date: Thu, 01 Jul 2021 22:34:58 +0900
From: 권오훈 <ohoono.kwon@...sung.com>
To: "mingo@...nel.org" <mingo@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"christian.brauner@...ntu.com" <christian.brauner@...ntu.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"ebiederm@...ssion.com" <ebiederm@...ssion.com>
CC: 권오훈 <ohoono.kwon@...sung.com>,
"ohkwon1043@...il.com" <ohkwon1043@...il.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] connector: send event on write to /proc/[pid]/comm
While comm change event via prctl has been reported to proc connector by
'commit f786ecba4158 ("connector: add comm change event report to proc
connector")', connector listeners were missing comm changes by explicit
writes on /proc/[pid]/comm.
Let explicit writes on /proc/[pid]/comm report to proc connector.
Signed-off-by: Ohhoon Kwon <ohoono.kwon@...sung.com>
---
fs/proc/base.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 9cbd915025ad..3e1e6b56aa96 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -95,6 +95,7 @@
#include <linux/posix-timers.h>
#include <linux/time_namespace.h>
#include <linux/resctrl.h>
+#include <linux/cn_proc.h>
#include <trace/events/oom.h>
#include "internal.h"
#include "fd.h"
@@ -1674,8 +1675,10 @@ static ssize_t comm_write(struct file *file, const char __user *buf,
if (!p)
return -ESRCH;
- if (same_thread_group(current, p))
+ if (same_thread_group(current, p)) {
set_task_comm(p, buffer);
+ proc_comm_connector(p);
+ }
else
count = -EINVAL;
--
2.17.1
Powered by blists - more mailing lists