linux/drivers/staging/speakup
Okash Khawaja f5bee24d86 staging: speakup: fix async usb removal
When an external USB synth is unplugged while the module is loaded, we
get a null pointer deref. This is because the tty disappears while
speakup tries to use to to communicate with the synth. This patch fixes
it by checking tty for null before using it. Since tty can become null
between the check and its usage, a mutex is introduced. tty usage is
now surrounded by the mutex, as is the code in speakup_ldisc_close which
sets the tty to null. The mutex also serialises calls to tty from
speakup code.

In case of tty being null, this sets synth->alive to zero and restarts
ttys in case they were stopped by speakup.

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-08-18 15:57:17 -07:00
..
buffers.c speakup: extend synth buffer to 16bit unicode characters 2017-03-09 17:28:20 +01:00
DefaultKeyAssignments
devsynth.c
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
Kconfig
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: safely register and unregister ldisc 2017-07-18 09:03:22 +02:00
Makefile staging: speakup: add tty-based comms functions 2017-05-16 14:05:42 +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_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
speakup.h staging: speakup: spaces preferred around operator 2017-03-23 14:20:41 +01:00
speakupmap.h
speakupmap.map
spk_priv_keyinfo.h staging: speakup: spk_priv_keyinfo.h Space around operator 2016-11-23 10:05:39 +01:00
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: fix async usb removal 2017-08-18 15:57:17 -07: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 staging: speakup: thread.c align on parenthesis 2016-11-21 11:05:29 +01:00
TODO staging: speakup: TODO Correct email 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