Miroslav Benes d5e47505e0 ftrace: Free the trampoline when ftrace_startup() fails
Commit fc0ea795f53c ("ftrace: Add symbols for ftrace trampolines")
missed to remove ops from new ftrace_ops_trampoline_list in
ftrace_startup() if ftrace_hash_ipmodify_enable() fails there. It may
lead to BUG if such ops come from a module which may be removed.

Moreover, the trampoline itself is not freed in this case.

Fix it by calling ftrace_trampoline_free() during the rollback.

Link: https://lkml.kernel.org/r/20200831122631.28057-1-mbenes@suse.cz

Fixes: fc0ea795f53c ("ftrace: Add symbols for ftrace trampolines")
Fixes: f8b8be8a310a ("ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict")
Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-09-18 12:19:08 -04:00
..
2020-08-03 11:57:03 -07:00
2020-09-11 09:33:54 -07:00
2020-08-26 12:41:56 +02:00
2020-08-04 22:22:25 -07:00
\n
2020-08-06 19:29:51 -07:00
2020-08-04 14:20:26 -07:00
2020-08-04 14:20:26 -07:00
2020-06-03 13:06:42 -07:00
2020-08-12 10:57:59 -07:00
2020-08-12 10:58:02 -07:00
2020-01-08 16:32:55 +00:00
2020-08-14 11:07:02 -07:00
2020-08-04 15:02:07 -07:00
2020-07-01 12:09:13 +03:00
2020-07-27 14:31:12 -04:00
2020-08-04 13:40:35 -07:00
2020-08-23 17:36:59 -05:00
2019-12-04 15:18:39 +01:00
2019-12-18 18:07:31 +01:00
2020-08-12 10:57:59 -07:00
2020-05-09 13:57:12 +02:00
2020-06-04 19:06:24 -07:00
2020-07-07 11:58:59 -05:00
2020-05-09 13:57:12 +02:00