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 samples: move auxdisplay example code from Documentation 2016-09-23 11:52:32 -06:00
blackfin samples: move blackfin gptimers-example from Documentation 2016-10-10 07:12:02 -06:00
bpf samples/bpf: Fix broken tracex1 due to kprobe argument change 2021-05-22 10:40:30 +02:00
configfs
connector samples: connector: from Documentation to samples directory 2016-04-28 07:47:35 -06:00
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 rpmsg: Allow callback to return errors 2016-09-08 22:15:25 -07:00
seccomp samples/seccomp: fix 64-bit comparison macros 2017-03-12 06:41:46 +01:00
timers samples: move timers example code from Documentation 2016-09-23 11:51:58 -06:00
trace_events Fix tracing sample code warning. 2017-11-08 10:08:33 +01:00
trace_printk tracing: Add trace_printk sample code 2016-06-20 09:54:21 -04:00
uhid
v4l [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
watchdog samples: move watchdog example code from Documentation 2016-09-23 11:52:14 -06:00
Kconfig samples: move blackfin gptimers-example from Documentation 2016-10-10 07:12:02 -06:00
Makefile samples: move blackfin gptimers-example from Documentation 2016-10-10 07:12:02 -06:00