lkml.org 
[lkml]   [2008]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Char: tty_io, fix closecount counting
Jiri Slaby napsal(a):
> filp->f_op->write never equals to tty_write for the console device, so
> closecount++ is never reached and we don't close console device so many
> times we open it before. (The closecount is used only for /dev/console.)
[...]
> drivers/char/tty_io.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
> index c9e6e24..8c7b6ed 100644
> --- a/drivers/char/tty_io.c
> +++ b/drivers/char/tty_io.c
> @@ -1434,9 +1434,9 @@ static void do_tty_hangup(struct work_struct *work)
> list_for_each_entry(filp, &tty->tty_files, f_u.fu_list) {
> if (filp->f_op->write == redirected_tty_write)
> cons_filp = filp;
> + closecount++;
> if (filp->f_op->write != tty_write)
> continue;
> - closecount++;

Hm, no, this is wrong.


\
 
 \ /
  Last update: 2008-05-26 17:25    [W:0.268 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site