@@ -217,12 +217,13 @@ NOKPROBE_SYMBOL(fentry_trace_func);
217217
218218/* function exit handler */
219219static int trace_fprobe_entry_handler (struct fprobe * fp , unsigned long entry_ip ,
220- unsigned long ret_ip , struct pt_regs * regs ,
220+ unsigned long ret_ip , struct ftrace_regs * fregs ,
221221 void * entry_data )
222222{
223223 struct trace_fprobe * tf = container_of (fp , struct trace_fprobe , fp );
224+ struct pt_regs * regs = ftrace_get_regs (fregs );
224225
225- if (tf -> tp .entry_arg )
226+ if (regs && tf -> tp .entry_arg )
226227 store_trace_entry_data (entry_data , & tf -> tp , regs );
227228
228229 return 0 ;
@@ -339,12 +340,16 @@ NOKPROBE_SYMBOL(fexit_perf_func);
339340#endif /* CONFIG_PERF_EVENTS */
340341
341342static int fentry_dispatcher (struct fprobe * fp , unsigned long entry_ip ,
342- unsigned long ret_ip , struct pt_regs * regs ,
343+ unsigned long ret_ip , struct ftrace_regs * fregs ,
343344 void * entry_data )
344345{
345346 struct trace_fprobe * tf = container_of (fp , struct trace_fprobe , fp );
347+ struct pt_regs * regs = ftrace_get_regs (fregs );
346348 int ret = 0 ;
347349
350+ if (!regs )
351+ return 0 ;
352+
348353 if (trace_probe_test_flag (& tf -> tp , TP_FLAG_TRACE ))
349354 fentry_trace_func (tf , entry_ip , regs );
350355#ifdef CONFIG_PERF_EVENTS
0 commit comments