]> git.baikalelectronics.ru Git - kernel.git/commit
Input: uinput - flush all pending ff effects before destroying device
authorAristeu Sergio Rozanski Filho <aris@ruivo.org>
Fri, 15 May 2009 05:01:57 +0000 (22:01 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 16 May 2009 02:23:44 +0000 (19:23 -0700)
commit24dd53847d2604e9d3a5f7f59011a522aca58ef5
tree883dbf8b1a8cb1ff4974a902f63ffc75ff890f5d
parentfdd5e10b25c08f41a69e0933a4bcae2cb695fb60
Input: uinput - flush all pending ff effects before destroying device

The destruction of a input device in uinput is triggered by an ioctl().
If a process tries to destroy an input device while other is uploading a
force feedback effect by evdev to the same device, they'll deadlock.
This patch fixes the problem by flushing all pending FF uploads before
destroying the device and preventing new uploads during this operation.

[dtor@mail.ru: fix logic that ensures we don't submit new requests
 to the device that is being destroyed.]
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/uinput.c