linux-stable/samples
Tiezhu Yang 3f3b4054e2 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-17 09:48:39 +01:00
..
auxdisplay auxdisplay: Fix a typo in cfag12864b-example.c 2019-08-08 20:00:18 +02:00
binderfs
bpf samples: bpf: Fix tracex7 error raised on the missing argument 2021-09-22 12:26:30 +02:00
configfs
connector
hidraw
hw_breakpoint
kdb
kfifo kfifo: fix ternary sign extension bugs 2021-05-14 09:44:32 +02:00
kobject
kprobes samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-17 09:48:39 +01:00
livepatch
mei
mic/mpssd misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-10-29 09:58:04 +01:00
pidfd
pktgen samples: pktgen: fix proc_cmd command result check logic 2019-12-31 16:43:45 +01:00
qmi
rpmsg samples/rpmsg: Introduce a module parameter for message count 2019-08-26 22:10:39 -07:00
seccomp samples/seccomp: Zero out members based on seccomp_notif_sizes 2020-01-09 10:19:57 +01:00
timers
trace_events
trace_printk samples/trace_printk: Wait for IRQ work to finish 2020-01-09 10:20:00 +01:00
uhid
v4l
vfio-mdev samples: vfio-mdev: fix error handing in mdpy_fb_probe() 2021-06-10 13:37:03 +02:00
vfs samples/vfs: avoid warning in statx override 2020-07-09 09:37:54 +02:00
watchdog
Kconfig docs: driver-api: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
Makefile