From: Theodore Ts'o <tytso@athena.mit.edu> Subject: Re: Bug in serial driver kernel 0.99.5 Date: 13 Feb 1993 17:40:49 -0500
From: Stephen Kump <skump@world.std.com>
Date: Sat, 13 Feb 1993 12:15:03 +0200
Same thing happens with the setserial command. Anyone can use
setserial to read the serial port settings, but trying to change
serial parameters as superuser hangs the machine.
Here's a patch to fix this problem. There's also a fix so that a
process which is waiting for the carrier detect on the dialin device
won't be prematurely woken when a dialout user closes the dialout device
with the carrier detect high, and there is a slight delay from when DTR
drops and when the modem drops CD.
- Ted
*** 1.1 1993/02/10 22:46:59
--- serial.c 1993/02/13 17:10:07
***************
*** 524,530 ****
if (info->blocked_open) {
shutdown(info);
startup(info);
- wake_up_interruptible(&info->open_wait);
return;
}
if (info->flags & ASYNC_INITIALIZED) {
--- 524,529 ----
***************
*** 737,743 ****
}
info->baud_base = new.baud_base;
! info->flags = new.flags & ASYNC_FLAGS;
info->custom_divisor = new.custom_divisor;
info->type = new.type;
--- 736,743 ----
}
info->baud_base = new.baud_base;
! info->flags = ((info->flags & ~ASYNC_FLAGS) |
! (new.flags & ASYNC_FLAGS));
info->custom_divisor = new.custom_divisor;
info->type = new.type;