[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170712192522.34f65e3b@alans-desktop>
Date: Wed, 12 Jul 2017 19:25:22 +0100
From: Alan Cox <gnomes@...rguk.ukuu.org.uk>
To: Okash Khawaja <okash.khawaja@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Samuel Thibault <samuel.thibault@...-lyon.org>,
linux-kernel@...r.kernel.org, William Hubbs <w.d.hubbs@...il.com>,
Chris Brannon <chris@...-brannons.com>,
Kirk Reiser <kirk@...sers.ca>, speakup@...ux-speakup.org,
devel@...verdev.osuosl.org
Subject: Re: [patch] staging: speakup: safely close tty
> spk_ttyio_initialise_ldisc is called separately for each module (e.g.
> speakup_apollo, speakup_ltlk etc) when it is loaded. spk_ttyio_release
> is also called separately for each module when it is unloaded. The ldisc
> stays around until the last of the modules is unloaded.
What guarantees that someone hasn't decided to set the ldisc on unrelated
hardware to speakup (eg on a pty/tty pair).
>
> >
> > I'd also btw strongly recommend putting the ldisc and the speakup tty
> > driver as different modules.
> Sure, that makes sense. I will do that following these patches.
If the ldisc is just unregistered when the module implementing it is
unloaded then the ref counts on the ldisc module should do everything
needed if the above isn't correctly handled, and if it is will still be
cleaner.
Alan
Powered by blists - more mailing lists