summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vzapolskiy@gmail.com>2011-09-21 09:26:44 +0000
committerDavid S. Miller <davem@davemloft.net>2011-09-28 13:41:50 -0400
commitf786ecba4158880f8cdc0ebb93e7d78e6c125449 (patch)
tree0291e9079912f41ad2dd67ffd609a554e98b7850 /kernel/sys.c
parent5dd17e08f333cde0fa11000792e33d8d39b5599f (diff)
downloadlinux-f786ecba4158880f8cdc0ebb93e7d78e6c125449.tar.gz
linux-f786ecba4158880f8cdc0ebb93e7d78e6c125449.tar.bz2
linux-f786ecba4158880f8cdc0ebb93e7d78e6c125449.zip
connector: add comm change event report to proc connector
Add an event to monitor comm value changes of tasks. Such an event becomes vital, if someone desires to control threads of a process in different manner. A natural characteristic of threads is its comm value, and helpfully application developers have an opportunity to change it in runtime. Reporting about such events via proc connector allows to fine-grain monitoring and control potentials, for instance a process control daemon listening to proc connector and following comm value policies can place specific threads to assigned cgroup partitions. It might be possible to achieve a pale partial one-shot likeness without this update, if an application changes comm value of a thread generator task beforehand, then a new thread is cloned, and after that proc connector listener gets the fork event and reads new thread's comm value from procfs stat file, but this change visibly simplifies and extends the matter. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 18ee1d2f6474..b3dfb76f8073 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1759,6 +1759,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
sizeof(me->comm) - 1) < 0)
return -EFAULT;
set_task_comm(me, comm);
+ proc_comm_connector(me);
return 0;
case PR_GET_NAME:
get_task_comm(comm, me);