# Re: \[PATCH v5 06/10\] Uprobes: Support SDT markers having reference count (semaphore)

- From: Ravi Bangoria \<hidden\>
- Date: 2018-07-04 04:53:38 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2018/07/5323852
- Thread: https://ratatoskr.run/linux-doc/2018/06/5318768/t.md

```text
Hi Oleg,

On 07/03/2018 10:55 PM, Oleg Nesterov wrote:
> On 07/03, Oleg Nesterov wrote:
>>
>> In short. There is a 1:1 relationship between uprobe_write_opcode(is_register => 1)
>> and install_breakpoint(), and between uprobe_write_opcode(is_register => 0) and
>> remove_breakpoint(). Whatever uprobe_write_opcode() can do if is_register == 1 can be
>> done in install_breakpoint(), the same for is_register == 0 and remove_breakpont().
>>
>> What have I missed?
> 
> Ah. I missed the fact that uprobe_write_opcode() doesn't do update_ref_ctr() if
> verify_opcode() returns false.
> 
> Now I understand what did you mean by "for each consumer". So if we move this logic
> into install/remove_breakpoint as I tried to suggest, we will also need another error
> code for the case when verify_opcode() returns false.

Ok so if we can use verify_opcode() inside install_breakpoint(), we can probably
move implementation logic in install/remove_breakpoint(). Let me explore that more.

Thanks,
Ravi

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
