Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Link: https://lkml.kernel.org/r/20210701133458epcms1p68e9eb9bd0eee8903ba26679a37d9d960@epcms1p6
Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ohhoon Kwon and committed by
Linus Torvalds
c2f273eb 8d23b208

+4 -1
+4 -1
fs/proc/base.c
··· 95 95 #include <linux/posix-timers.h> 96 96 #include <linux/time_namespace.h> 97 97 #include <linux/resctrl.h> 98 + #include <linux/cn_proc.h> 98 99 #include <trace/events/oom.h> 99 100 #include "internal.h" 100 101 #include "fd.h" ··· 1675 1674 if (!p) 1676 1675 return -ESRCH; 1677 1676 1678 - if (same_thread_group(current, p)) 1677 + if (same_thread_group(current, p)) { 1679 1678 set_task_comm(p, buffer); 1679 + proc_comm_connector(p); 1680 + } 1680 1681 else 1681 1682 count = -EINVAL; 1682 1683