diff options
author | Oleg Nesterov <[email protected]> | 2024-08-01 15:27:39 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2024-08-02 11:30:32 +0200 |
commit | bb18c5de1c288050ef8bd4af4ca16896ad4cd3fc (patch) | |
tree | 9ca4aafead6f962321612826b3c34f9e0039ad46 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 3c83a9ad0295eb63bdeb81d821b8c3b9417fbcac (diff) |
uprobes: change uprobe_register() to use uprobe_unregister() instead of __uprobe_unregister()
If register_for_each_vma() fails uprobe_register() can safely drop
uprobe->register_rwsem and use uprobe_unregister(). There is no worry
about the races with another register/unregister, consumer_add() was
already called so this case doesn't differ from _unregister() right
after the successful _register().
Yes this means the extra up_write() + down_write(), but this is the
slow and unlikely case anyway.
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Acked-by: "Masami Hiramatsu (Google)" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions