WSL2-Linux-Kernel/drivers/clocksource
Masahiro Yamada 245b993d8f clocksource: hyper-v: unexport __init-annotated hv_init_clocksource()
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 has been broken for a decade.

Recently, I fixed modpost so it started to warn it again, then this
showed up in linux-next builds.

There are two ways to fix it:

  - Remove __init
  - Remove EXPORT_SYMBOL

I chose the latter for this case because the only in-tree call-site,
arch/x86/kernel/cpu/mshyperv.c is never compiled as modular.
(CONFIG_HYPERVISOR_GUEST is boolean)

Fixes: dd2cb34861 ("clocksource/drivers: Continue making Hyper-V clocksource ISA agnostic")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20220606050238.4162200-1-masahiroy@kernel.org
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2022-06-08 12:27:08 +00:00
..
Kconfig Clockevent/clocksource updates: 2022-06-05 10:47:06 -07:00
Makefile Merge branch 'hpe/gxp-soc' into arm/late 2022-05-27 15:55:37 +02:00
acpi_pm.c clocksource: acpi_pm: fix return value of __setup handler 2022-03-18 14:59:27 +01:00
arc_timer.c
arm_arch_timer.c clocksource/drivers/arm_arch_timer: Use event stream scaling when available 2022-03-07 18:27:22 +01:00
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c
bcm2835_timer.c
bcm_kona_timer.c clocksource/drivers/bcm_kona: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
clksrc-dbx500-prcmu.c
clksrc_st_lpc.c
clps711x-timer.c
dummy_timer.c
dw_apb_timer.c
dw_apb_timer_of.c clocksource/drivers/dw_apb_timer_of: Fix probe failure 2021-12-10 17:46:54 +01:00
em_sti.c
exynos_mct.c clocksource/drivers/exynos_mct: Increase the size of name array 2022-03-07 18:27:22 +01:00
hyperv_timer.c clocksource: hyper-v: unexport __init-annotated hv_init_clocksource() 2022-06-08 12:27:08 +00:00
i8253.c
ingenic-ost.c
ingenic-sysost.c
ingenic-timer.c
jcore-pit.c clocksource/drivers/jcore: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
mips-gic-timer.c clocksource/drivers/mips-gic-timer: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
mmio.c
mps2-timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c
renesas-ostm.c clocksource/drivers/renesas-ostm: Add RZ/G2L OSTM support 2021-12-09 14:05:20 +01:00
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
timer-armada-370-xp.c clocksource/drivers/armada-370-xp: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-atmel-pit.c
timer-atmel-st.c
timer-atmel-tcb.c
timer-cadence-ttc.c
timer-clint.c
timer-cs5535.c
timer-davinci.c
timer-digicolor.c clocksource/drivers/digicolor: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-fsl-ftm.c
timer-fttmr010.c
timer-goldfish.c clocksource/drivers: Add a goldfish-timer clocksource 2022-04-11 11:48:01 +02:00
timer-gx6605s.c
timer-gxp.c clocksource/drivers/timer-gxp: Add HPE GXP Timer 2022-05-18 14:05:54 +02:00
timer-imx-gpt.c
timer-imx-sysctr.c clocksource/drivers/imx-sysctr: Drop IRQF_IRQPOLL 2022-01-26 10:00:39 +01:00
timer-imx-tpm.c clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM 2022-03-07 18:27:22 +01:00
timer-integrator-ap.c
timer-ixp4xx.c clocksource/drivers/ixp4xx: Drop boardfile probe path 2022-05-18 11:08:52 +02:00
timer-keystone.c
timer-lpc32xx.c clocksource/drivers/lpc32xx: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-mediatek.c
timer-meson6.c
timer-microchip-pit64b.c clocksource/drivers/timer-microchip-pit64b: Use 5MHz for clockevent 2022-03-07 18:27:34 +01:00
timer-milbeaut.c
timer-mp-csky.c
timer-msc313e.c clocksource/drivers/msc313e: Add support for ssd20xd-based platforms 2021-12-20 13:28:39 +01:00
timer-npcm7xx.c
timer-of.c clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init() 2022-03-07 19:21:25 +01:00
timer-of.h
timer-orion.c clocksource/drivers/orion: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-owl.c
timer-oxnas-rps.c clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value 2022-05-24 09:16:29 +02:00
timer-pistachio.c clocksource/drivers/pistachio: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-probe.c
timer-pxa.c
timer-qcom.c
timer-rda.c
timer-riscv.c clocksource/drivers/riscv: Events are stopped during CPU suspend 2022-05-18 11:08:52 +02:00
timer-rockchip.c
timer-sp.h
timer-sp804.c clocksource/drivers/sp804: Avoid error on multiple instances 2022-05-18 11:08:52 +02:00
timer-sprd.c
timer-stm32-lp.c
timer-stm32.c
timer-sun4i.c clocksource/drivers/timer-sun4i: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-sun5i.c clocksource/drivers/timer-sun5i: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-tegra.c
timer-ti-32k.c
timer-ti-dm-systimer.c Timers and timekeeping updates: 2022-03-21 12:53:14 -07:00
timer-ti-dm.c Clockevent/clocksource updates: 2022-06-05 10:47:06 -07:00
timer-versatile.c
timer-vf-pit.c
timer-vt8500.c
timer-zevio.c