linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dima Zavin <dima@android.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: evdev - fix variable initialisation
Date: Tue, 31 Jan 2012 13:40:42 -0800	[thread overview]
Message-ID: <CAPz4a6DDwt2uEX1o3ULSESjnVqMA1gBWoFP27XCviaOXd1-fpw@mail.gmail.com> (raw)
In-Reply-To: <201201312224.46360.heiko@sntech.de>

ugh, thanks for fixing this.

On Tue, Jan 31, 2012 at 1:24 PM, Heiko Stübner <heiko@sntech.de> wrote:
> Commit 509f87c5f564 (evdev - do not block waiting for an event if fd
> is nonblock) created a code path were it was possible to use retval
> uninitialized.
>
> This could lead to the xorg evdev input driver getting corrupt data
> and refusing to work with log messages like
>        AUO-Pixcir touchscreen: Read error: Success
>        sg060_keys: Read error: Success
>        AUO-Pixcir touchscreen: Read error: Success
>        sg060_keys: Read error: Success
> (for drivers auo-pixcir-ts and gpio-keys).
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Acked-by: Dima Zavin <dima@android.com>

> ---
> This is obviously meant as a fix for 3.3
>
>  drivers/input/evdev.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index 76457d5..afc166f 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -386,7 +386,7 @@ static ssize_t evdev_read(struct file *file, char __user *buffer,
>        struct evdev_client *client = file->private_data;
>        struct evdev *evdev = client->evdev;
>        struct input_event event;
> -       int retval;
> +       int retval = 0;
>
>        if (count < input_event_size())
>                return -EINVAL;
> --
> 1.7.2.3

  reply	other threads:[~2012-01-31 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 21:24 [PATCH] Input: evdev - fix variable initialisation Heiko Stübner
2012-01-31 21:40 ` Dima Zavin [this message]
2012-02-03  8:37   ` 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=CAPz4a6DDwt2uEX1o3ULSESjnVqMA1gBWoFP27XCviaOXd1-fpw@mail.gmail.com \
    --to=dima@android.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=heiko@sntech.de \
    --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).