Re: [PATCH] gpiolib: synchronize updates of descriptor labels
From: Andy Shevchenko
Date: Mon Nov 09 2026 - 13:04:55 EST
On Fri, Nov 06, 2026 at 10:22:07AM +0100, Bartosz Golaszewski wrote:
> On Thu, Nov 05, 2026 at 04:53:10PM +0200, Andy Shevchenko wrote:
> > On Thu, Nov 05, 2026 at 02:23:45PM +0100, Bartosz Golaszewski wrote:
> > > desc_set_label() swaps desc->label with rcu_replace_pointer() but
> > > without any synchronization of concurrent updates. The swap is a plain
> > > read + write: two threads can observe the same old label and then call
> >
> > s/call//
>
> Why? It's "call $function_name" which happens to be call_srcu().
Because with that kind of name it sounds not good (tautological).
> > > call_scru() on the same SRCU head corrupting the state of the chain.
--
With Best Regards,
Andy Shevchenko