From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754463AbYEaLvO (ORCPT ); Sat, 31 May 2008 07:51:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752182AbYEaLu7 (ORCPT ); Sat, 31 May 2008 07:50:59 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:20026 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180AbYEaLu7 (ORCPT ); Sat, 31 May 2008 07:50:59 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=JvKWH4Mdh9es2vCUTerx0k+23ziz511z1lWrLC1vOV2WwtJP3sGmRCe+BfPLBoU57dckLSqPeubVyiU6W/GSCBN/K+br8tSUaU9E4BhNVbW6lSwh1Sj90RPk7U8KeT5qmZ4qoStKElpFb9pp4EBzoFqk7bDHfTwdcGQzZOwdtAU= Message-ID: <48413BAC.9060509@gmail.com> Date: Sat, 31 May 2008 13:51:08 +0200 From: Jiri Slaby User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: Alan Cox CC: linux-kernel@vger.kernel.org, Paul Fulghum Subject: Re: [PATCH 1/1] Char: tty_io, fix closecount counting References: <1211810923-3122-1-git-send-email-jirislaby@gmail.com> <48413B6E.3050202@gmail.com> In-Reply-To: <48413B6E.3050202@gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jiri Slaby napsal(a): > Jiri Slaby napsal(a): >> This is probably a fix for an issue first reported in 2.6.18.1: >> http://lkml.org/lkml/2006/10/20/301 >> and >> http://marc.info/?l=linux-mips&m=118797256328587 > > Alan, I know, you already stated some time ago, that you don't have a > clue what could have caused this. Haven't you found anything since that > time as I think the hangup path is the only possible cause of this problem? > > I've found an other one from 2.6.17-rc4: > http://readlist.com/lists/vger.kernel.org/linux-kernel/44/220050.html > and from 2.6.22+suse_stuff: > http://lists.opensuse.org/opensuse-bugs/2008-04/msg05628.html > > It is ever vcs1, which is /dev/console and it is the only treated > separately (otherwise I think we would have more (and distinct) reports > like this). When the console is HUPped? And what should happen with > openers? The 2.6.22+suse happened when sulogin /dev/console was invoked. > Any ideas how to track this down? > >> --- 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++; >> tty_fasync(-1, filp, 0); /* can't block */ >> filp->f_op = &hung_up_tty_fops; >> } (Ah, btw, I've uttered this change as wrong.)