Messages in this thread Patch in this message |  | | Date | Wed, 18 Dec 1996 15:07:35 -0500 | From | "Theodore Y. Ts'o" <> | Subject | Re: 2.1.15 crash on boot |
| |
From: Neal Becker <neal@ctd.comsat.com> Date: 18 Dec 1996 10:17:20 -0500
I just tried 2.1.15. It dies in process 'setserial', with a divide by zero kernel error message. I didn't get a chance to write down all the details, but hopefully I can do that soon.
This is a known problem. Here is an untested patch that may fix things. Unfortunately my laptop is currently in the repair shop, so I haven't had a chance to work on this more, so I present this on a "no warantees" basis....
- Ted
Patch generated: on Mon Dec 16 18:05:26 EST 1996 by tytso@rsts-11.mit.edu against Linux version 2.1.15 =================================================================== RCS file: drivers/char/RCS/serial.c,v retrieving revision 1.1 diff -u -r1.1 drivers/char/serial.c --- drivers/char/serial.c 1996/12/13 10:33:33 1.1 +++ drivers/char/serial.c 1996/12/13 10:33:46 @@ -2365,6 +2365,9 @@ if (serial_paranoia_check(info, tty->device, "rs_wait_until_sent")) return; + if (info->state->type == PORT_UNKNOWN) + return; + orig_jiffies = jiffies; /* * Set the check interval to be 1/5 of the estimated time to @@ -2817,9 +2820,6 @@ info->port = state->port; info->flags = state->flags; - if(check_region(info->port,8)) - return; /* Area in use */ - save_flags(flags); cli(); /* @@ -3102,6 +3102,12 @@ state->irq = req->irq; state->port = req->port; state->flags = req->flags; + + if(check_region(state->port,8)) { + restore_flags(flags); + printk("register_serial(): I/O region in use\n"); + return -1; /* Area in use */ + } autoconfig(state); if (state->type == PORT_UNKNOWN) { restore_flags(flags);
|  |