Re: tty problems

Theodore Y. Ts'o (tytso@MIT.EDU)
Sat, 16 May 1998 01:35:04 -0400


Date: Wed, 29 Apr 1998 16:19:25 +0200
From: Guest <guest@manjak.knm.org.pl>

I've gut got these messages:
Warning: bad magic number for tty struct (04:41) in release_dev

rs_close: bad serial port count; tty->count is 1, state->count is 2

It happened when I stopped PPP connection. What's going on out there ?

I've been looking, and I think I've found a bug in the release_dev()
code. Here's a patch versus the 2.0 kernel; a similar patch should be
made to the 2.1 kernel. Can folks who have had this problem in the past
try testing this patch and letting me know if it fixes the problem?
Thanks!!

- Ted

Patch generated: on Sat May 16 00:03:34 EDT 1998 by tytso@rsts-11.mit.edu
against Linux version 2.0.33

===================================================================
RCS file: drivers/char/RCS/tty_io.c,v
retrieving revision 1.1
diff -u -r1.1 drivers/char/tty_io.c
--- drivers/char/tty_io.c 1998/05/16 03:54:33 1.1
+++ drivers/char/tty_io.c 1998/05/16 03:55:18
@@ -1163,6 +1163,10 @@
}
}
#endif
+
+ if (tty->driver.close)
+ tty->driver.close(tty, filp);
+
/*
* Sanity check: if tty->count is going to zero, there shouldn't be
* any waiters on tty->read_wait or tty->write_wait. We test the
@@ -1219,9 +1223,6 @@
* both sides, and we've completed the last operation that could
* block, so it's safe to proceed with closing.
*/
-
- if (tty->driver.close)
- tty->driver.close(tty, filp);

if (pty_master) {
if (--o_tty->count < 0) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu