Re: [PATCH v2 0/4] gpio: fix SRCU bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 14, 2024 at 08:08:33PM +0100, Bartosz Golaszewski wrote:
> On Wed, Feb 14, 2024 at 7:44 PM Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:
> >
> > On Wed, Feb 14, 2024 at 09:44:15AM +0100, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> > >
> > > Here are four fixes to some bugs in recent SRCU changes. The first one fixes
> > > an actual race condition. The other three just make lockdep happy.
> >
> > For 1/4-3/4:
> >
> > Acked-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
> >
> > For 4/4, you are playing with fire, but I will assume that you know what
> > you are doing.  ;-)
> 
> Up until this rework, this gdev->chip pointer could go from under any
> user at any point. Now we have this gpio_device wrapper that provides
> an entry point to using the chip safely while protected by the SRCU
> read lock. Anyone who is still accessing gpio_chip directly (and not
> being the GPIO provider themselves) is asking for trouble. There's
> however no point in spamming lockdep splats in this case. I may end up
> adding a warning to these routines.
> 
> Unfortunately, it's hard to fix 15 years of technical debt. :(

Indeed, life is sometimes hard!

							Thanx, Paul

> Thanks for the Acks.
> Bartosz
> 
> [snip]




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux