> uprobes/x86: Do not leak trampoline vma mapping on optimization failure
>
> In case the optimization fails, we leak new-ly created trampoline
> vma mapping (in case we just created it), let's unmap it.
>
> Fixes: ba2bfc97b462 ("uprobes/x86: Add support to optimize uprobes")
Should the Fixes: tag point to f4216a203c5d ("uprobes/x86: Remove struct
uprobe_trampoline object") instead?
The commit message of f4216a203c5d explicitly states: "Note the original
code called destroy_uprobe_trampoline if the optimiation failed, but it
only freed the struct uprobe_trampoline object, not the vma. The new vma
leak is fixed in following change."
This commit (ba6320f8c716) appears to be that following change fixing the
new vma leak introduced by f4216a203c5d.
> Reviewed-by: Oleg Nesterov <[email protected]>
> Signed-off-by: Jiri Olsa <[email protected]>
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/28659696456