Re: uprobe splat in PREEMP_RT

Sebastian Sewior
2025-04-02T12:06:52Z

On 2025-04-02 13:31:43 [+0200], Oleg Nesterov wrote:
> > > > Then we can remove the no longer necessary preempt_disable()'s
> > > > before write_seqcount_begin() in other users of seqcount_t.
> > >
> > > This depends on locktype that is coupled with the seqcount.
> >
> > Yes.
> >
> > But seqcount_t doesn't have the "internal" lock. Unlike other
> > seqcount's defined by SEQCOUNT_LOCKNAME().
> >
> > > If the lock disables preemption and relies on it then it must be somehow
> > > enforced on PREEMPT_RT or rely on the lock+unlock mechnanism to avoid
> > > deadlocks. Also it needs to be ensured that you don't have two writer
> > > since preemption is allowed.
> >
> > Sorry, I don't understand.
> >
> > Again, seqcount_t differs, it can't do lock+unlock like (say)
> > seqcount_spinlock_t.
>
> IOW.
>
> I understand that seqcount_t is not RT-friendly, but why exactly do
> you think the patch above can make the things worse?

We wouldn't notice such a case.

> Oleg.

Sebastian