kernel_optimize_test/drivers/hid
David Herrmann f50f9aabf3 HID: wiimote: fix FF deadlock
The input core has an internal spinlock that is acquired during event
injection via input_event() and friends but also held during FF callbacks.
That means, there is no way to share a lock between event-injection and FF
handling. Unfortunately, this is what is required for wiimote state
tracking and what we do with state.lock and input->lock.

This deadlock can be triggered when using continuous data reporting and FF
on a wiimote device at the same time. I takes me at least 30m of
stress-testing to trigger it but users reported considerably shorter
times (http://bpaste.net/show/132504/) when using some gaming-console
emulators.

The real problem is that we have two copies of internal state, one in the
wiimote objects and the other in the input device. As the input-lock is
not supposed to be accessed from outside of input-core, we have no other
chance than offloading FF handling into a worker. This actually works
pretty nice and also allows to implictly merge fast rumble changes into a
single request.

Due to the 3-layered workers (rumble+queue+l2cap) this might reduce FF
responsiveness. Initial tests were fine so lets fix the race first and if
it turns out to be too slow we can always handle FF out-of-band and skip
the queue-worker.

Cc: <stable@vger.kernel.org> # 3.11+
Reported-by: Thomas Schneider
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-07 17:08:26 +02:00
..
i2c-hid
usbhid
hid-a4tech.c
hid-apple.c
hid-appleir.c
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-cherry.c
hid-chicony.c
hid-core.c HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGlider 2013-10-02 17:04:15 +02:00
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elecom.c
hid-elo.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-generic.c
hid-gyration.c
hid-holtek-kbd.c
hid-holtek-mouse.c HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGlider 2013-10-02 17:04:15 +02:00
hid-holtekff.c
hid-huion.c
hid-hyperv.c
hid-icade.c
hid-ids.h HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGlider 2013-10-02 17:04:15 +02:00
hid-input.c
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-lenovo-tpkbd.c
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lg.c
hid-lg.h
hid-lgff.c
hid-logitech-dj.c
hid-logitech-dj.h
hid-magicmouse.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c
hid-ntrig.c
hid-ortek.c
hid-petalynx.c
hid-picolcd_backlight.c
hid-picolcd_cir.c
hid-picolcd_core.c
hid-picolcd_debugfs.c
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-picolcd.h
hid-pl.c
hid-primax.c
hid-prodikeys.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-konepure.h
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-sensor-hub.c
hid-sjoy.c
hid-sony.c
hid-speedlink.c
hid-steelseries.c
hid-sunplus.c
hid-thingm.c
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c
hid-wacom.c
hid-waltop.c
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-modules.c HID: wiimote: fix FF deadlock 2013-10-07 17:08:26 +02:00
hid-wiimote.h HID: wiimote: fix FF deadlock 2013-10-07 17:08:26 +02:00
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c HID: hidraw: close underlying device at removal of last reader 2013-10-02 17:02:08 +02:00
Kconfig HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGlider 2013-10-02 17:04:15 +02:00
Makefile
uhid.c