WSL2-Linux-Kernel/samples
Arnd Bergmann abdfde0377 samples/hw_breakpoint: fix building without module unloading
[ Upstream commit b9080468ca ]

__symbol_put() is really meant as an internal helper and is not available
when module unloading is disabled, unlike the previously used symbol_put():

samples/hw_breakpoint/data_breakpoint.c: In function 'hw_break_module_exit':
samples/hw_breakpoint/data_breakpoint.c:73:9: error: implicit declaration of function '__symbol_put'; did you mean '__symbol_get'? [-Werror=implicit-function-declaration]

The hw_break_module_exit() function is not actually used when module
unloading is disabled, but it still causes the build failure for an
undefined identifier. Enclose this one call in an appropriate #ifdef to
clarify what the requirement is. Leaving out the entire exit function
would also work but feels less clar in this case.

Fixes: 910e230d5f ("samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'")
Fixes: d8a84d33a4 ("samples/hw_breakpoint: drop use of kallsyms_lookup_name()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 11:10:01 +02:00
..
acrn
auxdisplay
binderfs
bpf samples/bpf: fix broken map lookup probe 2023-09-19 12:22:34 +02:00
configfs
connector
ftrace samples: ftrace: Save required argument registers in sample trampolines 2023-07-23 13:47:55 +02:00
hidraw
hw_breakpoint samples/hw_breakpoint: fix building without module unloading 2023-09-23 11:10:01 +02:00
kdb kdb: Rename members of struct kdbtab_t 2021-07-27 17:05:06 +01:00
kfifo
kmemleak
kobject
kprobes samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-18 19:16:42 +01:00
landlock samples/landlock: Format with clang-format 2022-06-09 10:23:23 +02:00
livepatch
mei samples: mei: don't wait on read completion upon write. 2021-08-01 09:54:22 +02:00
nitro_enclaves
pidfd
pktgen samples: pktgen: add trap SIGINT for printing execution result 2021-08-25 13:44:30 +01:00
qmi
rpmsg
seccomp
timers
trace_events tracing: Add trace_event helper macros __string_len() and __assign_str_len() 2021-08-17 11:47:52 -04:00
trace_printk
uhid
v4l
vfio-mdev samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2022-12-31 13:14:31 +01:00
vfs
watch_queue
watchdog
Kconfig vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE 2021-06-21 15:29:25 -06:00
Makefile