Skip to content

Commit b801f1e

Browse files
mkerriskKAGA-KOKO
authored andcommitted
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: 769071a ("ns: Introduce Time Namespace") Signed-off-by: Michael Kerrisk <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Dmitry Safonov <[email protected]> Acked-by: Christian Brauner <[email protected]> Acked-by: Andrei Vagin <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent 7e63420 commit b801f1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/time/namespace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ const struct proc_ns_operations timens_operations = {
447447

448448
const struct proc_ns_operations timens_for_children_operations = {
449449
.name = "time_for_children",
450+
.real_ns_name = "time",
450451
.type = CLONE_NEWTIME,
451452
.get = timens_for_children_get,
452453
.put = timens_put,

0 commit comments

Comments
 (0)