From: Krzysztof Kozlowski <krzk@kernel.org>
To: dmitry.torokhov@gmail.com
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Hartmut Knaack" <knaack.h@gmx.de>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
"Kukjin Kim" <kgene@kernel.org>,
"Andrzej Pietrasiewicz" <andrzej.p@collabora.com>,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
linux-iio@vger.kernel.org,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] iio: adc: exynos: do not rely on 'users' counter in ISR
Date: Tue, 6 Oct 2020 09:08:32 +0200 [thread overview]
Message-ID: <CAJKOXPfgDcNOuO6RJpLjacvKVSPg5siLnC+2sKKhJmPgCrGpDA@mail.gmail.com> (raw)
In-Reply-To: <20201006041214.GA4145870@dtor-ws>
On Tue, 6 Oct 2020 at 06:12, <dmitry.torokhov@gmail.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@collabora.com>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.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@kernel.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2020-10-06 7:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 4:12 [PATCH v2] iio: adc: exynos: do not rely on 'users' counter in ISR dmitry.torokhov
2020-10-06 7:08 ` Krzysztof Kozlowski [this message]
2020-10-06 19:39 ` Michał Mirosław
2020-10-06 21:50 ` dmitry.torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJKOXPfgDcNOuO6RJpLjacvKVSPg5siLnC+2sKKhJmPgCrGpDA@mail.gmail.com \
--to=krzk@kernel.org \
--cc=andrzej.p@collabora.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@kernel.org \
--cc=kgene@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).