Re: [PATCH 1/1] uprobe: fix comment of uprobe_apply()

From
Leizhen (ThunderTown) <hidden>
Date
2024-08-21 01:39:20
Also in
linux-perf-users, lkml
Reply to
Oleg Nesterov, 2024-08-20

On 2024/8/20 22:30, Oleg Nesterov wrote:
On 08/20, Zhen Lei wrote:
quoted
Depending on the argument 'add', uprobe_apply() may be registering or
unregistering a probe.
...
quoted
 /*
- * uprobe_apply - unregister an already registered probe.
- * @inode: the file in which the probe has to be removed.
+ * uprobe_apply - register a probe or unregister an already registered probe.
Not really.

See the commit 3c83a9ad0295eb63bd ("uprobes: make uprobe_register() return struct uprobe *")
in tip/perf/core which changed this description

	* uprobe_apply - add or remove the breakpoints according to @uc->filter

still looks confusing, yes...
OK, I got it. I mistakenly thought the comment was based on register_for_each_vma.
It seems necessary to rename 'register_for_each_vma' to 'apply_for_each_vma',
or some other more appropriate name.
Oleg.


.
-- 
Regards,
  Zhen Lei
Thread (3 messages) 3 messages, 2 authors, last reply 2024-08-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help