WSL2-Linux-Kernel/kernel/time
Masahiro Yamada 2390095113 tick/nohz: unexport __init-annotated tick_nohz_full_setup()
EXPORT_SYMBOL and __init is a bad combination because the .init.text
section is freed up after the initialization. Hence, modules cannot
use symbols annotated __init. The access to a freed symbol may end up
with kernel panic.

modpost used to detect it, but it had been broken for a decade.

Commit 28438794ab ("modpost: fix section mismatch check for exported
init/exit sections") fixed it so modpost started to warn it again, then
this showed up:

    MODPOST vmlinux.symvers
  WARNING: modpost: vmlinux.o(___ksymtab_gpl+tick_nohz_full_setup+0x0): Section mismatch in reference from the variable __ksymtab_tick_nohz_full_setup to the function .init.text:tick_nohz_full_setup()
  The symbol tick_nohz_full_setup is exported and annotated __init
  Fix this by removing the __init annotation of tick_nohz_full_setup or drop the export.

Drop the export because tick_nohz_full_setup() is only called from the
built-in code in kernel/sched/isolation.c.

Fixes: ae9e557b5b ("time: Export tick start/stop functions for rcutorture")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-06-27 10:43:12 -07:00
..
Kconfig clocksource: Add a Kconfig option for WATCHDOG_MAX_SKEW 2022-02-01 17:35:43 -08:00
Makefile
alarmtimer.c
clockevents.c clockevents: Use dedicated list iterator variable 2022-04-10 12:38:45 +02:00
clocksource-wdtest.c
clocksource.c clocksource: Replace cpumask_weight() with cpumask_empty() 2022-04-10 22:30:04 +02:00
hrtimer.c
itimer.c
jiffies.c
namespace.c
ntp.c
ntp_internal.h
posix-clock.c
posix-cpu-timers.c signal: Replace __group_send_sig_info with send_signal_locked 2022-05-11 14:33:17 -05:00
posix-stubs.c
posix-timers.c
posix-timers.h
sched_clock.c time/sched_clock: Fix formatting of frequency reporting code 2022-05-02 14:29:04 +02:00
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c
tick-internal.h
tick-legacy.c
tick-oneshot.c
tick-sched.c tick/nohz: unexport __init-annotated tick_nohz_full_setup() 2022-06-27 10:43:12 -07:00
tick-sched.h tick: Detect and fix jiffies update stall 2022-03-07 23:01:19 +01:00
time.c
time_test.c
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c Random number generator updates for Linux 5.19-rc1. 2022-05-24 11:58:10 -07:00
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c Random number generator updates for Linux 5.19-rc1. 2022-05-24 11:58:10 -07:00
timer_list.c
vsyscall.c