On Wed, 19 Feb 2025 09:53:32 +0900
Masami Hiramatsu (Google) <[email protected]> wrote:

> Can you use this version?
> 
> diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c
> index 2560b312ad57..7d282c08549e 100644
> --- a/kernel/trace/fprobe.c
> +++ b/kernel/trace/fprobe.c
> @@ -409,7 +409,8 @@ static void fprobe_graph_remove_ips(unsigned long *addrs, 
> int num)
>               return;
>       }
>  
> -     ftrace_set_filter_ips(&fprobe_graph_ops.ops, addrs, num, 1, 0);
> +     if (num)
> +             ftrace_set_filter_ips(&fprobe_graph_ops.ops, addrs, num, 1, 0);
>  }
>  
>  static int symbols_cmp(const void *a, const void *b)
> @@ -679,8 +680,7 @@ int unregister_fprobe(struct fprobe *fp)
>       }
>       del_fprobe_hash(fp);
>  
> -     if (count)
> -             fprobe_graph_remove_ips(addrs, count);
> +     fprobe_graph_remove_ips(addrs, count);
>  
>       kfree_rcu(hlist_array, rcu);
>       fp->hlist_array = NULL;

Yes, that looks better. I'll add that to v2.

-- Steve

Reply via email to