Commit da40b0b6 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: evdev - try to wake up readers only if we have full packet

We should only wake waiters on the event device when we actually post
an EV_SYN/SYN_REPORT to the queue. Otherwise we end up making waiting
threads runnable only to go right back to sleep because the device
still isn't readable.
Reported-by: default avatarJeffrey Brown <jeffbrown@android.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 8c127f07
...@@ -111,7 +111,8 @@ static void evdev_event(struct input_handle *handle, ...@@ -111,7 +111,8 @@ static void evdev_event(struct input_handle *handle,
rcu_read_unlock(); rcu_read_unlock();
wake_up_interruptible(&evdev->wait); if (type == EV_SYN && code == SYN_REPORT)
wake_up_interruptible(&evdev->wait);
} }
static int evdev_fasync(int fd, struct file *file, int on) static int evdev_fasync(int fd, struct file *file, int on)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment