uprobe: fix comment of uprobe_apply()
Subsystems (3)
PATCH 1/1 uprobe: fix comment of uprobe_apply()
Depending on the argument 'add', uprobe_apply() may be registering or unregistering a probe. The current comment misses the description of the registration.
--- kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/events/uprobes.c +2 -2
@@ -1201,8 +1201,8 @@ int uprobe_register_refctr(struct inode *inode, loff_t offset,EXPORT_SYMBOL_GPL (uprobe_register_refctr);/* -* 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. +* @inode: the file in which the probe has to be placed or removed. * @offset: offset from the start of the file. * @uc: consumer which wants to add more or remove some breakpoints * @add: add or remove the breakpoints
Signature · 1 line
2.34.1
Oleg Nesterov
maintainerQuoted 3 lines · Zhen Lei
Depending on the argument 'add',
uprobe_apply()may be registering or unregistering a probe.
...
Quoted 4 lines
/*
- *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...
Oleg.
Quoted 12 lines · Oleg Nesterov
Quoted 3 lines · Zhen Lei
Depending on the argument 'add',
uprobe_apply()may be registering or unregistering a probe....
Quoted 4 lines
/*
- *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.
Quoted 8 lines
Not really.
See the commit
3c83a9ad0295eb63bd("uprobes: makeuprobe_register()return struct uprobe *") in tip/perf/core which changed this description*
uprobe_apply- add or remove the breakpoints according to @uc->filterstill 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.
Quoted 6 lines
Oleg.
.
Signature · 2 lines
Regards, Zhen Lei