Re: Patch: Fix serial module use count (2.4.16 _and_ 2.5)

Maciej W. Rozycki
2001-11-30T12:14:59Z

On Fri, 30 Nov 2001, Russell King wrote:

> Have you audited all the tty drivers in 2.4 to make sure that they clean
> up safely?

No, of course not -- if I had got a response like "this looks mostly OK,
but please check other drivers", then I would have certainly done. I
think drivers/tc/zs.c is OK, too, but this was more than a year ago, so I
can't recall now, sorry.

> I don't believe the serial code will clean up safely as it stands for
> starters if block_til_ready in serial.c fails, leaving an interrupt
> in use. Further attempts to open the serial device will probably fail.
>
> Try this as any user with your patch applied:
>
> $ stty -clocal -F /dev/ttyS0
> $ cat /proc/interrupts
> $ cat /dev/ttyS0
> ^c
> $ cat /proc/interrupts
>
> I think you'll find your serial port interrupt is still claimed, despite
> the module being marked as not in use.

Indeed -- maybe something was changed past 2.4.5, after all. I'll check
how things look like these days. I nowhere use serial.c as a module
anymore, as all systems I maintain are now configured for the serial
console, so I might have missed something.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +