Re: uprobe splat in PREEMP_RT

Sebastian Sewior
2025-04-02T10:57:49Z

On 2025-04-02 12:33:55 [+0200], Oleg Nesterov wrote:
>
> I still didn't read this code, but after the quick glance I don't
> understand why do we actually need utask->ri_seqcount.

Same here but on it…

> The "writer" ri_timer() can't race with itself, right?

On PREEMPT_RT the timer could be preempted by a task with higher
priority and invoke hprobe_expire() somewhere else.

> The "reader" free_ret_instance() uses raw_seqcount_try_begin() without
> the "retry" logic.
>
> I have no idea if this logic is correct or not, but it seems that (apart
> from the necessary barriers) we could use the utask->ri_timer_is_running
> boolean instead with the same effect? Set/cleared in ri_timer(), checked
> in free_ret_instance().
>
> I must have missed something...

Let me try to study this before I can make a statement…

> Oleg.

Sebastian