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.

Merge tag 'timers-urgent-2020-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull time(keeping) updates from Thomas Gleixner:

- Fix the time_for_children symlink in /proc/$PID/ so it properly
reflects that it part of the 'time' namespace

- Add the missing userns limit for the allowed number of time
namespaces, which was half defined but the actual array member was
not added. This went unnoticed as the array has an exessive empty
member at the end but introduced a user visible regression as the
output was corrupted.

- Prevent further silent ucount corruption by adding a BUILD_BUG_ON()
to catch half updated data.

* tag 'timers-urgent-2020-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
ucount: Make sure ucounts in /proc/sys/user don't regress again
time/namespace: Add max_time_namespaces ucount
time/namespace: Fix time_for_children symlink

+10
+6
Documentation/admin-guide/sysctl/user.rst
··· 65 65 The maximum number of pid namespaces that any user in the current 66 66 user namespace may create. 67 67 68 + max_time_namespaces 69 + =================== 70 + 71 + The maximum number of time namespaces that any user in the current 72 + user namespace may create. 73 + 68 74 max_user_namespaces 69 75 =================== 70 76
+1
kernel/time/namespace.c
··· 447 447 448 448 const struct proc_ns_operations timens_for_children_operations = { 449 449 .name = "time_for_children", 450 + .real_ns_name = "time", 450 451 .type = CLONE_NEWTIME, 451 452 .get = timens_for_children_get, 452 453 .put = timens_put,
+3
kernel/ucount.c
··· 69 69 UCOUNT_ENTRY("max_net_namespaces"), 70 70 UCOUNT_ENTRY("max_mnt_namespaces"), 71 71 UCOUNT_ENTRY("max_cgroup_namespaces"), 72 + UCOUNT_ENTRY("max_time_namespaces"), 72 73 #ifdef CONFIG_INOTIFY_USER 73 74 UCOUNT_ENTRY("max_inotify_instances"), 74 75 UCOUNT_ENTRY("max_inotify_watches"), ··· 82 81 { 83 82 #ifdef CONFIG_SYSCTL 84 83 struct ctl_table *tbl; 84 + 85 + BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS + 1); 85 86 setup_sysctl_set(&ns->set, &set_root, set_is_seen); 86 87 tbl = kmemdup(user_table, sizeof(user_table), GFP_KERNEL); 87 88 if (tbl) {