> >> - trigger_data issue: > >> it appears that the instance being removed is not the same as > >> the one that was originally set. > > > > Did you mean it will free invalid struct event_trigger_data by > > wprobe_trigger_free(), or hw_breakpoint instance? > > > > When trace_event_enable_disable(wprobe_data->file, 1, 1) at > > wprobe_trigger_cmd_parse(), the trace_wprobe is enabled == call > > enable_trace_wprobe(), which eventually call register_wide_hw_breakpoint() > > with dummy address. IOW, the (wide)hw_breakpoint is allocated here. > > > > When the trigger is hit, modify_wide_hw_breakpoint_local() is called > > for updating local target address on the same hw_breakpoint. > > So latter instance should be the same. > In wprobe_trigger_cmd_parse(), consider removing: > echo '!set_wprobe:watch:dentry' >> events/fprobes/truncate/trigger > The trigger_data passed to event_trigger_unregister() is freshly allocated. Ah, thanks for pointing it out. I confused to free newly allocated trigger_data instead of existing one on the list. Let me fix that. Thank you, -- Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>