From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: linux-input@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-kernel@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: Re: [PATCH] Input: synaptics - clear device info before filling in
Date: Mon, 29 May 2017 20:16:54 -0700 [thread overview]
Message-ID: <20170530031654.GE32841@dtor-ws> (raw)
In-Reply-To: <20170529052707.2144-1-ebiggers3@gmail.com>
On Sun, May 28, 2017 at 10:27:07PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> synaptics_query_hardware() was being passed a
> 'struct synaptics_device_info' in uninitialized stack memory, then not
> always initializing all fields. This caused garbage to show up in
> certain fields, making the touchpad unusable.
>
> Fix by zeroing the device info, so all fields default to 0.
>
> Fixes: 6c53694fb222 ("Input: synaptics - split device info into a separate structure")
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thank you.
> ---
> drivers/input/mouse/synaptics.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 131df9d3660f..4f97970abc94 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -397,6 +397,8 @@ static int synaptics_query_hardware(struct psmouse *psmouse,
> {
> int error;
>
> + memset(info, 0, sizeof(*info));
> +
> error = synaptics_identify(psmouse, info);
> if (error)
> return error;
> --
> 2.13.0
>
--
Dmitry
prev parent reply other threads:[~2017-05-30 3:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 5:27 [PATCH] Input: synaptics - clear device info before filling in Eric Biggers
2017-05-30 3:16 ` Dmitry Torokhov [this message]
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=20170530031654.GE32841@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=ebiggers3@gmail.com \
--cc=ebiggers@google.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).