Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688169
| From | Okash Khawaja <okash.khawaja@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [patch v2 1/1] staging: speakup: safely close tty |
| Date | 2017-07-16 11:40 +0200 |
| Message-ID | <u3ObT-5lh-17@gated-at.bofh.it> (permalink) |
| References | <u2uyB-3hF-3@gated-at.bofh.it> <u3ObT-5lh-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- drivers/staging/speakup/spk_ttyio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -300,7 +300,7 @@ void spk_ttyio_release(void) tty_ldisc_flush(speakup_tty); tty_unlock(speakup_tty); - tty_ldisc_release(speakup_tty); + tty_release_struct(speakup_tty, speakup_tty->index); } EXPORT_SYMBOL_GPL(spk_ttyio_release);
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[patch] staging: speakup: safely close tty Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-07 21:20 +0200
Re: [patch] staging: speakup: safely close tty Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-07-10 14:00 +0200
Re: [patch] staging: speakup: safely close tty Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-11 12:40 +0200
Re: [patch] staging: speakup: safely close tty Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-07-12 20:30 +0200
Re: [patch] staging: speakup: safely close tty Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-13 13:30 +0200
[patch v2 0/1] staging: speakup: safely close tty Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-16 11:40 +0200
[patch v2 1/1] staging: speakup: safely close tty Okash Khawaja <okash.khawaja@gmail.com> - 2017-07-16 11:40 +0200
csiph-web