Re: uprobe splat in PREEMP_RT

Oleg Nesterov
2025-04-02T12:19:38Z

On 04/02, Sebastian Sewior wrote:
>
> On 2025-04-02 13:23:09 [+0200], Oleg Nesterov wrote:
> > On 04/02, Sebastian Sewior wrote:
> > >
> > > On 2025-04-02 12:33:55 [+0200], Oleg Nesterov wrote:
> > > >
> > > > 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.
> >
> > This is clear, but ri_timer() still can not race with itself, no?
>
> No, ri_timer() can not race against itself.

Okay,

> The preempted ri_timer() could stall a read_seqcount_begin().

Again, nobody use read_seqcount_begin(utask->ri_seqcount).

free_ret_instance() uses raw_seqcount_try_begin(utask->ri_seqcount),
which, since ri_seqcount is seqcount_t, is just smp_load_acquire().
This can't stall.

Oleg.