linux-stable/samples
Tiezhu Yang 50d9b55d71 samples/kretprobes: Fix return value if register_kretprobe() failed
[ Upstream commit f76fbbbb50 ]

Use the actual return value instead of always -1 if register_kretprobe()
failed.

E.g. without this patch:

 # insmod samples/kprobes/kretprobe_example.ko func=no_such_func
 insmod: ERROR: could not insert module samples/kprobes/kretprobe_example.ko: Operation not permitted

With this patch:

 # insmod samples/kprobes/kretprobe_example.ko func=no_such_func
 insmod: ERROR: could not insert module samples/kprobes/kretprobe_example.ko: Unknown symbol in module

Link: https://lkml.kernel.org/r/1635213091-24387-2-git-send-email-yangtiezhu@loongson.cn

Fixes: 804defea1c ("Kprobes: move kprobe examples to samples/")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:48:36 +01:00
..
auxdisplay
blackfin
bpf samples/bpf: Fix broken tracex1 due to kprobe argument change 2021-05-22 10:40:30 +02:00
configfs
connector
hidraw
hw_breakpoint
kdb
kfifo kfifo: fix ternary sign extension bugs 2021-05-22 10:40:28 +02:00
kobject
kprobes samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-26 11:48:36 +01:00
livepatch
mei mei: samples: fix a signedness bug in amt_host_if_call() 2019-11-25 09:53:24 +01:00
mic/mpssd misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-10-29 09:05:43 +01:00
pktgen samples: pktgen: fix proc_cmd command result check logic 2020-01-04 13:39:18 +01:00
rpmsg
seccomp
timers
trace_events
trace_printk
uhid
v4l
watchdog
Kconfig
Makefile