]> git.baikalelectronics.ru Git - kernel.git/commit
kernel/utsname_sysctl.c: Fix hostname polling
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 23 Oct 2022 19:01:01 +0000 (12:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 23 Oct 2022 19:01:01 +0000 (12:01 -0700)
commitad645a1a162d28251d56421a1481fe89f4e0523a
tree4eaff71d807daa09812652d29e6e9f90e46300b4
parent4b0e7901ff96f509649cfd9c5d5a5a23192aea95
kernel/utsname_sysctl.c: Fix hostname polling

Commit fae65a7ffc63 ("kernel/utsname_sysctl.c: print kernel arch") added
a new entry to the uts_kern_table[] array, but didn't update the
UTS_PROC_xyz enumerators of older entries, breaking anything that used
them.

Which is admittedly not many cases: it's really just the two uses of
uts_proc_notify() in kernel/sys.c.  But apparently journald-systemd
actually uses this to detect hostname changes.

Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Fixes: fae65a7ffc63 ("kernel/utsname_sysctl.c: print kernel arch")
Link: https://lore.kernel.org/lkml/0c2b92a6-0f25-9538-178f-eee3b06da23f@secunet.com/
Link: https://linux-regtracking.leemhuis.info/regzbot/regression/0c2b92a6-0f25-9538-178f-eee3b06da23f@secunet.com/
Cc: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/utsname.h
kernel/utsname_sysctl.c