Re: Division by zero in serial device in 2.1.125

Etienne Lorrain (lorrain@fb.sony.de)
Thu, 29 Oct 1998 10:20:14 +0001


Anders Melchiorsen <postmaster@and.nospam.kampsax.k-net.dk> wrote:
> After trying to get my modem to work I found this in my log. I did a
> "setserial 2400" and after that the device did not work. As I found
> this message later, I do not have the shell output. Also, I was unable
> to reproduce.

Same Oops here, not reproducable after hard reboot or
with strace, with:
setserial /dev/ttyS3 divisor 0

It can easily be removed in "change_speed()":
/* If the quotient is ever zero, default to 9600 bps */
if (!quot)
quot = baud_base / 9600;
info->quot = quot;
info->timeout = ((info->xmit_fifo_size*HZ*bits*quot) / baud_base);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
But in fact (baud_base == 0) should be filtered before,
and it is really done when you begin to debug (murphy's law).

More strange, complete look of the (386, 2.1.124) machine
(hard reset) after this Oops when I typed command without
number:
sync
setserial /dev/ttyS3 divisor

Daze and confused,
Etienne.

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