From: Greg KH <gregkh@linuxfoundation.org>
To: Andri Yngvason <andri@yngvason.is>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH RESEND] HID: multitouch: Add memory barriers
Date: Wed, 17 Aug 2022 13:59:30 +0200 [thread overview]
Message-ID: <YvzYIm21ZKYpUApA@kroah.com> (raw)
In-Reply-To: <20220817113247.3530979-1-andri@yngvason.is>
On Wed, Aug 17, 2022 at 11:32:48AM +0000, Andri Yngvason wrote:
> This fixes a race with the release-timer by adding acquire/release
> barrier semantics.
What race?
>
> I noticed that contacts were sometimes sticking, even with the "sticky
> fingers" quirk enabled. This fixes that problem.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Andri Yngvason <andri@yngvason.is>
> ---
> drivers/hid/hid-multitouch.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 2e72922e36f5..91a4d3fc30e0 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -1186,7 +1186,7 @@ static void mt_touch_report(struct hid_device *hid,
> int contact_count = -1;
>
> /* sticky fingers release in progress, abort */
> - if (test_and_set_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags))
> + if (test_and_set_bit_lock(MT_IO_FLAGS_RUNNING, &td->mt_io_flags))
So this is now a lock?
Why not just use a real lock instead?
thanks,
greg k-h
next prev parent reply other threads:[~2022-08-17 11:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 11:32 [PATCH RESEND] HID: multitouch: Add memory barriers Andri Yngvason
2022-08-17 11:59 ` Greg KH [this message]
2022-08-17 16:14 ` Andri Yngvason
2022-08-17 17:02 ` Greg KH
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=YvzYIm21ZKYpUApA@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andri@yngvason.is \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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