Messages in this thread Patch in this message |  | | | Date | Fri, 7 Aug 1998 12:23:13 -0400 | | From | "Theodore Y. Ts'o" <> | | Subject | Re: [2.1.113] What is CHECK_TTY_COUNT warning me about? |
| |
At least some (if not most) of the recent CHECK_TTY_COUNTS appear to be caused by the syscons patch which went in. I'm not yet 100% convinced that this solves all of the problems though, although it probably accounts for at least 90% of the cases reported in the last few weeks.
Could folks try applying this patch (which was developed by Miquel van Smoorenburg <miquels@cistron.nl>), and see if it makes the problem go away?
If you can still easily the "tty count" problem after applying this patch, I definitely want to hear about it. As always, please send as much details as possible of your system. Thanks!!
- Ted
--- linux-2.1.113/drivers/char/tty_io.c.orig Mon Aug 3 20:44:21 1998 +++ linux-2.1.113/drivers/char/tty_io.c Mon Aug 3 21:11:08 1998 @@ -375,8 +375,10 @@ { struct tty_struct *tty = (struct tty_struct *) data; struct file * filp; + struct file * cons_filp = NULL; struct task_struct *p; unsigned long flags; + int closecount = 0, n; if (!tty) return; @@ -392,10 +394,13 @@ if (!filp->f_dentry->d_inode) continue; if (filp->f_dentry->d_inode->i_rdev == CONSOLE_DEV || - filp->f_dentry->d_inode->i_rdev == SYSCONS_DEV) + filp->f_dentry->d_inode->i_rdev == SYSCONS_DEV) { + cons_filp = filp; continue; + } if (filp->f_op != &tty_fops) continue; + closecount++; tty_fasync(filp, 0); filp->f_op = &hung_up_tty_fops; } @@ -447,7 +452,11 @@ tty->session = 0; tty->pgrp = -1; tty->ctrl_status = 0; - if (tty->driver.hangup) + if (cons_filp) { + if (tty->driver.close) + for (n = 0; n < closecount; n++) + tty->driver.close(tty, cons_filp); + } else if (tty->driver.hangup) (tty->driver.hangup)(tty); restore_flags(flags); }
- 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.altern.org/andrebalsa/doc/lkml-faq.html
|  |