[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250528180305.000079b7@huawei.com>
Date: Wed, 28 May 2025 18:03:05 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Gyeyoung Baek <gye976@...il.com>
CC: Andy Shevchenko <andy.shevchenko@...il.com>, Jonathan Cameron
<jic23@...nel.org>, David Lechner <dlechner@...libre.com>, Nuno
Sá <nuno.sa@...log.com>, Andy Shevchenko
<andy@...nel.org>, <linux-iio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] iio: trigger: Avoid data race
On Wed, 28 May 2025 22:27:25 +0900
Gyeyoung Baek <gye976@...il.com> wrote:
> On Wed, May 28, 2025 at 6:22 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> >
> > On Wed, May 28, 2025 at 10:01 AM Gyeyoung Baek <gye976@...il.com> wrote:
> > >
> > > A data race could occur between `atomic_read()` and `atomic_set()`.
> > > Use `atomic_cmpxchg_relaxed()` to group them atomically.
> > >
> > > Previously the main logic was executed when `use_count` was 0.
> > > Now it returns early when `use_count` was not 0.
> >
> > This needs Fixes tag, otherwise LGTM,
> > Reviewed-by: Andy Shevchenko <andy@...nel.org>
>
> Yes, then I'll send v3, thanks!
Slow down :)
Reply to v1. In general don't rush new versions out so quickly.
>
> > --
> > With Best Regards,
> > Andy Shevchenko
>
Powered by blists - more mailing lists