Ubuntu-focal-kernel/samples
Tiezhu Yang 3d8d3a4ed1 samples/kretprobes: Fix return value if register_kretprobe() failed
BugLink: https://bugs.launchpad.net/bugs/1953387

[ Upstream commit f76fbbbb5061fe14824ba5807c44bd7400a6b4e1 ]

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
2022-01-13 18:42:26 +01:00
..
auxdisplay
binderfs
bpf samples: bpf: Fix tracex7 error raised on the missing argument 2021-10-12 16:31:32 -06:00
configfs
connector
hidraw
hw_breakpoint
kdb
kfifo kfifo: fix ternary sign extension bugs 2021-05-26 15:39:25 +02:00
kobject
kprobes samples/kretprobes: Fix return value if register_kretprobe() failed 2022-01-13 18:42:26 +01:00
livepatch
mei
mic/mpssd misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-11-09 14:49:12 +01:00
pidfd
pktgen
qmi
rpmsg
seccomp
timers
trace_events
trace_printk samples/trace_printk: Wait for IRQ work to finish 2020-01-30 16:22:02 +01:00
uhid
v4l
vfio-mdev samples: vfio-mdev: fix error handing in mdpy_fb_probe() 2021-07-15 19:27:01 +02:00
vfs samples/vfs: avoid warning in statx override 2020-08-08 01:53:12 -04:00
watchdog
Kconfig
Makefile