On Wed, 28 Oct 2026 10:03:48 -0400, Steven Rostedt <[email protected]> wrote: > On Wed, 28 Oct 2026 10:28:10 +0900 > "Masami Hiramatsu (Google)" <[email protected]> wrote: > > > Hmm, IMHO, there is a bad implementation in __ftrace_set_clr_event_nolock(). > > It should make a working copy of the filter string and pass it to > > apply_event_filter(). Or pass the filter string as `const char *` > > so that it is copied in the apply_event_filter() side. The ownership > > of the filter string is not clear here. > > I noticed this when I applied the patch. > > Yes, the correct solution is to pass in const char *filter to > __ftrace_set_clr_event_nolock() (I was planning on doing this after the > merge window closed). But no, making a copy in > __ftrace_set_clr_event_nolock() is *not* the right solution. There's > nothing in that function that modifies that string to suggest it needs to > make a copy of it. > > The correct solution is to pass const char *filter to apply_event_filter() > and have *that* function do the copy. That was my plan to make a patch for.
OK, so at this moment I will follow Sashiko's suggestion. Thanks! > > -- Steve > > -- Masami Hiramatsu (Google) <[email protected]>
