Input: evdev - fix variable initialisation
Subsystems (2)
PATCH 1/1 Input: evdev - fix variable initialisation
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).
---
This is obviously meant as a fix for 3.3
drivers/input/evdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/evdev.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.2.3
ugh, thanks for fixing this.
Quoted 12 lines · Heiko Stübner
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).
Quoted 1 line
Signed-off-by Heiko Stuebner <[email protected]>
Quoted 20 lines
---
This is obviously meant as a fix for 3.3drivers/input/evdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)drivers/input/evdev.c +1
-2@@ -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; --
Quoted 1 line
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Dima Zavin
ugh, thanks for fixing this.
Quoted 12 lines · Heiko Stübner
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).
Quoted 4 lines
Quoted 1 line
Signed-off-by Heiko Stuebner <[email protected]>Acked-by Dima Zavin <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry