[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJKOXPfgDcNOuO6RJpLjacvKVSPg5siLnC+2sKKhJmPgCrGpDA@mail.gmail.com>
Date: Tue, 6 Oct 2020 09:08:32 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: dmitry.torokhov@...il.com
Cc: Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Kukjin Kim <kgene@...nel.org>,
Andrzej Pietrasiewicz <andrzej.p@...labora.com>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
linux-iio@...r.kernel.org,
"linux-samsung-soc@...r.kernel.org"
<linux-samsung-soc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] iio: adc: exynos: do not rely on 'users' counter in ISR
On Tue, 6 Oct 2020 at 06:12, <dmitry.torokhov@...il.com> wrote:
>
> The order in which 'users' counter is decremented vs calling drivers'
> close() method is implementation specific, and we should not rely on
> it. Let's introduce driver private flag and use it to signal ISR
> to exit when device is being closed.
>
> This has a side-effect of fixing issue of accessing inut->users
> outside of input->mutex protection.
>
> Reported-by: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
>
> v2: switched from ordinary read/write to READ_ONCE/WRITE_ONCE per Michał
> Mirosław
>
> drivers/iio/adc/exynos_adc.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Acked-by: Krzysztof Kozlowski <krzk@...nel.org>
Best regards,
Krzysztof
Powered by blists - more mailing lists