Re: uprobe splat in PREEMP_RT

Oleg Nesterov
2025-04-02T16:58:29Z

On 04/02, Andrii Nakryiko wrote:
>
> On Wed, Apr 2, 2025 at 3:34 AM Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > 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().
>
> "Apart from the necessary barriers" is exactly what I didn't want to
> deal with, tbh... Which is why I went with (ab)using seqcount lock.
>
> Other than that, yes, the reader logic is very simple and just wants
> to make sure that ri_timer (writer) couldn't have seen the
> return_instance we are about to immediately reuse (which would pose a
> problem).

Ah. This answers my question about the motivation to use seqcount_t,
thanks.

I am not going to question your decision, but perhaps this deserves a
comment, it is not immediately clear from reading this code...

Thanks!

Oleg.