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

From: Maciej W. Rozycki (macro@ds2.pg.gda.pl)
Date: Fri Nov 30 2001 - 07:11:15 EST


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        +

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 30 2001 - 21:00:38 EST