On Mon, May 18, 2026 at 05:25:43PM +0200, Thomas Monjalon wrote:
> 18/05/2026 17:14, Robin Jarry:
> > Hey Thomas,
> > 
> > Thomas Monjalon, May 18, 2026 at 17:07:

<snip>

> 
> [...]
> > > @@ -246,10 +246,9 @@ static inline void 
> > > rte_spinlock_recursive_unlock(rte_spinlock_recursive_t *slr)
> > >   __rte_no_thread_safety_analysis
> > >  {
> > >   if (--(slr->count) == 0) {
> > 
> > This code is completely broken. Any thread can unlock without any check.
> 
> Maybe, but I don't intend to fix recursive unlock in this patch.
> The subject is "remove volatile qualifier" (and unblock GCC 16).
> 
As with regular mutexes, threads should not go around unlocking when not
holding the lock. Therefore, I think this is fine. [With regular spinlocks
we can't check since we don't track threads, therefore I think we just need
to assume a well-behaved app.]

/Bruce

Reply via email to