diff --git a/kmod/core/core.c b/kmod/core/core.c index 77c729053..2b76c893b 100644 --- a/kmod/core/core.c +++ b/kmod/core/core.c @@ -515,9 +515,13 @@ kpatch_ftrace_handler(unsigned long ip, unsigned long parent_ip, preempt_enable_notrace(); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) +#define FTRACE_OPS_FL_IPMODIFY 0 +#endif + static struct ftrace_ops kpatch_ftrace_ops __read_mostly = { .func = kpatch_ftrace_handler, - .flags = FTRACE_OPS_FL_SAVE_REGS, + .flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_IPMODIFY, }; static int kpatch_ftrace_add_func(unsigned long ip)