On Mon, Jul 01, 2024 at 06:41:07PM +0200, Jiri Olsa wrote: > +static void > +uprobe_consumer_account(struct uprobe *uprobe, struct uprobe_consumer *uc) > +{ > + static unsigned int session_id; > + > + if (uc->session) { > + uprobe->sessions_cnt++; > + uc->session_id = ++session_id ?: ++session_id; > + } > +}
The way I understand this code, you create a consumer every time you do uprobe_register() and unregister makes it go away. Now, register one, then 4g-1 times register+unregister, then register again. The above seems to then result in two consumers with the same session_id, which leads to trouble. Hmm?