Re: [PATCHv6 perf/core 08/22] uprobes/x86: Add mapping for optimized uprobe trampolines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 19, 2025 at 04:53:45PM +0200, Peter Zijlstra wrote:
> On Sun, Jul 20, 2025 at 01:21:18PM +0200, Jiri Olsa wrote:
> > +static void destroy_uprobe_trampoline(struct uprobe_trampoline *tramp)
> > +{
> > +	/*
> > +	 * We do not unmap and release uprobe trampoline page itself,
> > +	 * because there's no easy way to make sure none of the threads
> > +	 * is still inside the trampoline.
> > +	 */
> > +	hlist_del(&tramp->node);
> > +	kfree(tramp);
> > +}
> 
> I am somewhat confused; isn't this called from
> __mmput()->uprobe_clear_state()->arch_uprobe_clear_state ?
> 
> At that time we don't have threads anymore and mm is about to be
> destroyed anyway.

ah you mean the comment, right? we need to release tramp objects

the comment is leftover from some of the previous version, it can be
removed, sorry

jirka




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux