]> git.baikalelectronics.ru Git - kernel.git/commit
ucount: Make sure ucounts in /proc/sys/user don't regress again
authorJan Kara <jack@suse.cz>
Tue, 7 Apr 2020 15:46:43 +0000 (17:46 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 7 Apr 2020 19:51:27 +0000 (21:51 +0200)
commit9637b168a02509ff14bd34777e3dbdf7e4766ce9
treede1caf1fe11058ab0f429502bd3c54bcc7727031
parentb3f52a5ad197513a48e8e6c93cb9a0f25bfc70a9
ucount: Make sure ucounts in /proc/sys/user don't regress again

Commit 6863f52c2620 "ns: Introduce Time Namespace" broke reporting of
inotify ucounts (max_inotify_instances, max_inotify_watches) in
/proc/sys/user because it has added UCOUNT_TIME_NAMESPACES into enum
ucount_type but didn't properly update reporting in
kernel/ucount.c:setup_userns_sysctls(). This problem got fixed in commit
b3f52a5ad197 "time/namespace: Add max_time_namespaces ucount".

Add BUILD_BUG_ON to catch a similar problem in the future.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andrei Vagin <avagin@gmail.com>
Link: https://lkml.kernel.org/r/20200407154643.10102-1-jack@suse.cz
kernel/ucount.c