kernel/utsname_sysctl.c: Add missing enum uts_proc value
authorPetr Vorel <pvorel@suse.cz>
Thu, 20 Oct 2022 15:06:45 +0000 (17:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Oct 2022 16:12:52 +0000 (18:12 +0200)
bfca3dd3d068 added new struct ctl_table uts_kern_table[], but not new
enum uts_proc value. It broke the notification mechanism between the
sethostname syscall and the pollers of /proc/sys/kernel/hostname.

The table uts_kern_table is addressed within uts_proc_notify by the enum
value, that's why new enum value is needed.

Fixes: bfca3dd3d068 ("kernel/utsname_sysctl.c: print kernel arch")
Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Link: https://lore.kernel.org/r/20221020150645.11719-1-pvorel@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/utsname.h

index 2b1737c9b244dd77047b82de3ebda83d6a6310f0..bf7613ba412bfe2dae6ced334952e97cddee65cd 100644 (file)
@@ -10,6 +10,7 @@
 #include <uapi/linux/utsname.h>
 
 enum uts_proc {
+       UTS_PROC_ARCH,
        UTS_PROC_OSTYPE,
        UTS_PROC_OSRELEASE,
        UTS_PROC_VERSION,