unaddressed issues around tty_open_by_driver

Samuel Thibault samuel.thibault at ens-lyon.org
Tue Jun 27 06:27:14 EDT 2017


Okash Khawaja, on mar. 27 juin 2017 11:20:34 +0100, wrote:
> 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.

Ah, right. So we need to do what the unregistration triggered by
userland achieves, ok.

So yes, it could make sense to have to unstaticify some functions.

Samuel


More information about the Speakup mailing list