Re: [PATCH v6 06/10] iio: adc: ad_sigma_delta: Fix a race condition

Jonathan Cameron
2024-12-08T18:23:57Z

On Sun, 8 Dec 2024 15:05:38 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sun, Dec 8, 2024 at 2:42 PM Jonathan Cameron <jic23@kernel.org> wrote:
> > On Fri, 6 Dec 2024 18:28:38 +0100
> > Uwe Kleine-König <u.kleine-koenig@baylibre.com> wrote:
>
> ...
>
> > From sparse.
> >
> > drivers/iio/adc/ad_sigma_delta.c:205:13: warning: context imbalance in 'ad_sd_disable_irq' - wrong count at exit
> > drivers/iio/adc/ad_sigma_delta.c:218:13: warning: context imbalance in 'ad_sd_enable_irq' - wrong count at exit
> >
> > I saw your discussion with Linus on this...
> >
> > https://lore.kernel.org/all/CAHk-=wiVDZejo_1BhOaR33qb=pny7sWnYtP4JUbRTXkXCkW6jA@mail.gmail.com/
> >
> > So I guess we just treat that as a false positive and move on.
>
> I'm wondering if sparse annotation __acquire and __release may help here...

The complaint is (I think) about guard(spinlock_irqsave)
so I'm not immediately sure how.