OpenCloudOS-Kernel/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
..
DefaultKeyAssignments
Kconfig Staging: speakup: Fix allyesconfig build on mn10300 2016-02-01 13:05:44 -08:00
Makefile staging: speakup: add tty-based comms functions 2017-05-16 14:05:42 +02:00
TODO staging: speakup: TODO Correct email 2016-11-21 11:05:29 +01:00
buffers.c speakup: extend synth buffer to 16bit unicode characters 2017-03-09 17:28:20 +01:00
devsynth.c Staging: speakup: Remove space after cast 2016-08-15 19:14:53 +02:00
fakekey.c staging: speakup: Remove the explicit NULL comparison 2017-03-27 14:00:41 +02:00
i18n.c staging: speakup: i18n.c: Refactor conditionals in spk_msg_set 2017-03-12 15:27:45 +01:00
i18n.h
keyhelp.c staging: speakup: Clean up if conditions 2017-03-06 09:39:54 +01:00
kobjects.c staging: speakup: Removed Unnecessary parentheses. 2017-03-23 14:20:41 +01:00
main.c staging: speakup: fix speakup-r empty line lockup 2017-09-18 12:25:31 +02:00
selection.c staging: speakup: Match alignment with open parenthesis. 2017-03-23 14:20:41 +01:00
serialio.c staging: speakup: alignment match open parens 2017-06-06 16:17:31 +02:00
serialio.h staging: speakup: add send_xchar, tiocmset and input functionality for tty 2017-05-16 14:19:41 +02:00
speakup.h staging: speakup: spaces preferred around operator 2017-03-23 14:20:41 +01:00
speakup_acnt.h
speakup_acntpc.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
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 staging: speakup: fix unnecessary long line 2017-05-15 12:44:20 +02:00
speakup_dectlk.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_dtlk.c staging: speakup: make input functionality swappable 2017-05-15 12:31:43 +02:00
speakup_dtlk.h drivers/staging/speakup: Align block comments at * 2017-05-15 12:44:20 +02:00
speakup_dummy.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_keypc.c Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
speakup_ltlk.c staging: speakup: make ttyio synths use device name 2017-06-27 09:12:33 +02:00
speakup_soft.c staging: speakup: make input functionality swappable 2017-05-15 12:31:43 +02:00
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
speakupmap.h
speakupmap.map
spk_priv.h staging: speakup: add functions to register and unregister ldisc 2017-07-18 09:03:21 +02:00
spk_priv_keyinfo.h staging: speakup: spk_priv_keyinfo.h Space around operator 2016-11-23 10:05:39 +01: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 Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
synth.c staging: speakup: fix synth caching when synth init fails 2017-06-25 16:31:22 +02:00
thread.c staging: speakup: thread.c align on parenthesis 2016-11-21 11:05:29 +01:00
varhandlers.c staging: speakup: fixes braces {} should be used on all arms of this statement 2017-03-23 14:20:41 +01:00