Re: [PATCH RT 1/5] net: Properly annotate the try-lock for the seqlock

From: Sebastian Andrzej Siewior
Date: Mon Nov 16 2020 - 12:20:21 EST


On 2020-11-15 05:52:33 [+0100], Mike Galbraith wrote:
> On Sat, 2020-11-14 at 13:24 -0600, Tom Zanussi wrote:
> > On Sat, 2020-11-14 at 20:00 +0100, Mike Galbraith wrote:
> >
> > > __raw_write_seqcount_end() is an integral part of write_sequnlock(),
> > > but we do seem to be missing a seqcount_release() in 5.4-rt.
> > >
> >
> > Yep, you're right, it's just the missing seqcount_release() - I'll
> > resubmit with just that.
>
> Or just drop the backport, since it adds annotation, while the original
> was fixing existing annotation.
>
> __raw_write_seqcount_begin() called in 5.4-rt try_write_seqlock() is
> not annotated, while write_seqcount_begin() called by the 5.9-rt
> version leads to the broken annotation that the original then fixed.

That is correct.
I was looking at the 5.4-RT series Steven posted and I was under the
impression that this patch was correctly missing in previous RT since I
even added the stable tag.
As Mike said, the previous RT implementation did not use seqlock
annotation, they used a spin-lock instead. So the "try_write_seqlock()"
did the try-lock annotation.
With the reworked seqcount implementation (v5.6-RT time frame) this was
solved differently (closer to what upstream does) and the now the
annotation was wrong and fixed.

Sorry for that.

> -Mike

Sebastian