linux/drivers/staging/speakup
Okash Khawaja e5f5d0e20b staging: speakup: fix speakup-r empty line lockup
When cursor is at beginning of an empty or whitespace-only line and
speakup-r typed, kernel locks up. This happens because deadlock of in
input_event function over dev->event_lock, as demonstrated by lockdep
logs. The reason for that is speakup simulates a down arrow - because
cursor is at an empty line - while inside key press notifier handler
which is ultimately triggered from input_event function. The simulated
key press leads to input_event being called again, this time under its
own context. So the spinlock is dev->event_lock is acquired while still
being held.

This patch ensures that key press is not simulated from inside key press
notifier handler. Instead it delegates to cursor_timer. It starts the
timer and passes RA_DOWN_ARROW as argument. When timer handler runs and
sees RA_DOWN_ARROW, it will then call kbd_fakekey2(RA_DOWN_ARROW) which
will correctly simulate the keypress inside timer context.

When not inside key press notifier callback, the behaviour will remain
the same as before this patch.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18 12:25:31 +02:00
..
buffers.c
DefaultKeyAssignments
devsynth.c
fakekey.c
i18n.c
i18n.h
Kconfig
keyhelp.c
kobjects.c
main.c staging: speakup: fix speakup-r empty line lockup 2017-09-18 12:25:31 +02:00
Makefile
selection.c
serialio.c staging: speakup: alignment match open parens 2017-06-06 16:17:31 +02:00
serialio.h
speakup_acnt.h
speakup_acntpc.c
speakup_acntsa.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_apollo.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_audptr.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_bns.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_decext.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_decpc.c
speakup_dectlk.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_dtlk.c
speakup_dtlk.h
speakup_dummy.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_keypc.c
speakup_ltlk.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_soft.c
speakup_spkout.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_txprt.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup.h
speakupmap.h
speakupmap.map
spk_priv_keyinfo.h
spk_priv.h staging: speakup: add functions to register and unregister ldisc 2017-07-18 09:03:21 +02:00
spk_ttyio.c staging: speakup: use tty_kopen and tty_kclose 2017-08-28 16:15:42 +02:00
spk_types.h staging: speakup: check and convert dev name or ser to dev_t 2017-06-27 09:12:33 +02:00
spkguide.txt
synth.c staging: speakup: fix synth caching when synth init fails 2017-06-25 16:31:22 +02:00
thread.c
TODO
varhandlers.c