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

Russell King (rmk@arm.linux.org.uk)
Fri, 30 Nov 2001 10:56:33 +0000


On Fri, Nov 30, 2001 at 11:44:14AM +0100, Maciej W. Rozycki wrote:
> Here is a fix I'm using for 2.4. It was submitted to Alan once, then a
> discussion was performed with a conclusion like "that may be a temporary
> fix for 2.4, but it needs a complete rework for 2.5". I'm not sure if the
> patch went in anywhere.

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

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.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- 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/