diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-11-20 00:51:43 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-11-20 00:51:43 -0500 |
commit | e597f0c80de7e2ef840b28d111ec532988abc432 (patch) | |
tree | 2d8c36d705c27dd081cbd7a6907257d3ad43c8e0 /drivers/input/misc | |
parent | 59c7c0377e00a3cbd7b71631177fb92166ceb437 (diff) |
Input: uinput - don't use "interruptible" in FF code
If thread that submitted FF request gets interrupted somehow it
will release request structure and ioctl handler will work with
freed memory. TO prevent that from happening switch to using
wait_for_completion instead of wait_for_completion_interruptible.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/uinput.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 4702ade804a..546ed9b4901 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -92,24 +92,19 @@ static void uinput_request_done(struct uinput_device *udev, struct uinput_reques { /* Mark slot as available */ udev->requests[request->id] = NULL; - wake_up_interruptible(&udev->requests_waitq); + wake_up(&udev->requests_waitq); complete(&request->done); } static int uinput_request_submit(struct input_dev *dev, struct uinput_request *request) { - int retval; - /* Tell our userspace app about this new request by queueing an input event */ uinput_dev_event(dev, EV_UINPUT, request->code, request->id); /* Wait for the request to complete */ - retval = wait_for_completion_interruptible(&request->done); - if (!retval) - retval = request->retval; - - return retval; + wait_for_completion(&request->done); + return request->retval; } static int uinput_dev_upload_effect(struct input_dev *dev, struct ff_effect *effect) |