diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-10-17 16:43:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-17 17:03:57 -0700 |
commit | e7507ed91e093b9e4e218e41ebfdce05458258fc (patch) | |
tree | c2e89b585e9153677d626bb7dfe7ef12426016a0 /drivers/input | |
parent | 5cc9eeef9a9567acdfc2f6943f24381bf460f008 (diff) | |
download | blackbird-op-linux-e7507ed91e093b9e4e218e41ebfdce05458258fc.tar.gz blackbird-op-linux-e7507ed91e093b9e4e218e41ebfdce05458258fc.zip |
[PATCH] uniput - fix crash on SMP
Only signal completion after marking request slot as free, otherwise other
processor can free request structure before we finish using it.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/uinput.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index d5c5b32045af..4015a91f4b6e 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -90,11 +90,11 @@ static inline int uinput_request_reserve_slot(struct uinput_device *udev, struct static void uinput_request_done(struct uinput_device *udev, struct uinput_request *request) { - complete(&request->done); - /* Mark slot as available */ udev->requests[request->id] = NULL; wake_up_interruptible(&udev->requests_waitq); + + complete(&request->done); } static int uinput_request_submit(struct input_dev *dev, struct uinput_request *request) |