staging: speakup: safely close tty
authorOkash Khawaja <okash.khawaja@gmail.com>
Sun, 16 Jul 2017 09:28:21 +0000 (10:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jul 2017 07:03:21 +0000 (09:03 +0200)
commit216ce2962089b6218708bf87d96e6b1fbadba1d7
tree75cc79d83508d76062902a0bb3b68c03c32c9327
parent740c433ec35187b45abe08bb6c45a321a791be8e
staging: speakup: safely close tty

Speakup opens tty using tty_open_by_driver. When closing, it calls
tty_ldisc_release but doesn't close and remove the tty itself. As a
result, that tty cannot be opened from user space. This patch calls
tty_release_struct which ensures that tty is safely removed and freed
up. It also calls tty_ldisc_release, so speakup doesn't need to call it.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/spk_ttyio.c