livepatch: use FTRACE_OPS_FL_IPMODIFY

Use the FTRACE_OPS_FL_IPMODIFY flag to prevent conflicts with other
ftrace users who also modify regs->ip.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Josh Poimboeuf 2014-12-22 13:39:54 +01:00 committed by Jiri Kosina
parent b5bfc51707
commit 33e8612f64
1 changed files with 2 additions and 1 deletions

View File

@ -641,7 +641,8 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func)
ops->private = func;
ops->func = klp_ftrace_handler;
ops->flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_DYNAMIC;
ops->flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_DYNAMIC |
FTRACE_OPS_FL_IPMODIFY;
func->fops = ops;
func->state = KLP_DISABLED;