unaddressed issues around tty_open_by_driver

Okash Khawaja okash.khawaja at gmail.com
Tue Jun 27 06:20:34 EDT 2017

On Tue, Jun 27, 2017 at 11:50:18AM +0200, Samuel Thibault wrote:
> Okash Khawaja, on mar. 27 juin 2017 10:44:45 +0100, wrote:
> > Next, I think, we need to restore tty->termios.c_line to the ldisc
> > before speakup was loaded, because that's what is used when opening tty
> > [1]. Locally, I have done that by caching original ldisc and then
> > calling tty_set_termios_ldisc on module exit which resolves that issue.
> > However, in kernel tty_set_termios_ldisc is static function and will
> > need to be exported if we want to call it.
> Mmm, it looks odd to be doing such kind of hackery. It'd probably be
> good to check how other line disciplines are doing.
Other ldiscs don't call tty_set_ldisc. They seem to rely on user space
setting the ldisc and hence to clean up also. They just register ldisc
on module init and unregister it on module exit.

I haven't looked at _exactly_ happens when something like N_MOUSE is
removed, so will do that now.

More information about the Speakup mailing list