Commit 8e009118 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: uinput - allow FF requests to time out

Previously uinput force feedback requests waited for the userspace
indefinitely, which caused users to block when uinput server process
become unresponsive. Let's establish a 30 seconds deadline for servicing
upload and erase force feedback effect actions, so that users have a
chance to abort stuck requests.
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 8446b32b
...@@ -149,7 +149,11 @@ static int uinput_request_submit(struct uinput_device *udev, ...@@ -149,7 +149,11 @@ static int uinput_request_submit(struct uinput_device *udev,
if (retval) if (retval)
goto out; goto out;
wait_for_completion(&request->done); if (!wait_for_completion_timeout(&request->done, 30 * HZ)) {
retval = -ETIMEDOUT;
goto out;
}
retval = request->retval; retval = request->retval;
out: out:
......
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