]> git.baikalelectronics.ru Git - kernel.git/commit
time/namespace: Fix time_for_children symlink
authorMichael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Fri, 3 Apr 2020 12:11:39 +0000 (14:11 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 7 Apr 2020 10:37:21 +0000 (12:37 +0200)
commit4d48eff539319ddf9a419a52072d642c5d98459a
treea94d0a5198bc6d587ae661fa5a848d5cfc70a809
parenta75e87490ed917c61ddc24d37d50f3069efe4bc0
time/namespace: Fix time_for_children symlink

Looking at the contents of the /proc/PID/ns/time_for_children symlink shows
an anomaly:

$ ls -l /proc/self/ns/* |awk '{print $9, $10, $11}'
...
/proc/self/ns/pid -> pid:[4026531836]
/proc/self/ns/pid_for_children -> pid:[4026531836]
/proc/self/ns/time -> time:[4026531834]
/proc/self/ns/time_for_children -> time_for_children:[4026531834]
/proc/self/ns/user -> user:[4026531837]
...

The reference for 'time_for_children' should be a 'time' namespace, just as
the reference for 'pid_for_children' is a 'pid' namespace.  In other words,
the above time_for_children link should read:

/proc/self/ns/time_for_children -> time:[4026531834]

Fixes: 6863f52c2620 ("ns: Introduce Time Namespace")
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: Andrei Vagin <avagin@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/a2418c48-ed80-3afe-116e-6611cb799557@gmail.com
kernel/time/namespace.c