public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Pavel Roskin <proski@gnu.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.68-bk1 crash in devfs_remove() for defpts files
Date: Mon, 21 Apr 2003 21:56:37 +0200	[thread overview]
Message-ID: <20030421215637.A30019@lst.de> (raw)
In-Reply-To: <Pine.LNX.4.55.0304211539350.2462@marabou.research.att.com>; from proski@gnu.org on Mon, Apr 21, 2003 at 03:44:07PM -0400

On Mon, Apr 21, 2003 at 03:44:07PM -0400, Pavel Roskin wrote:
> Following is happening.  The system boots, /dev/pts is a directory (I can
> see it by logging on the serial console).  devpts is mounted on /dev/pts.
> 
> I log in by ssh.  It works.  /dev/pts/0 appears.  I log out.  /dev/pts
> directory disappears!
> 
> I log in by ssh again.  I get this message on the console:
> 
> devfs_remove: no entry for pts!
> 
> ssh hangs.  I can recreate /dev/pts by mkdir, umount it and mount it
> again.  Then ssh works again, but again only once.  /dev/pts disappears on
> logout.

Oh, I see now.  There's a longstanding bug in the handling of
TTY_DRIVER_NO_DEVFS that got exposed by this.

Please try this patch additionally:


--- 1.78/drivers/char/tty_io.c	Sat Apr 19 19:24:04 2003
+++ edited/drivers/char/tty_io.c	Mon Apr 21 20:33:35 2003
@@ -2139,12 +2139,14 @@
  */
 void tty_register_device(struct tty_driver *driver, unsigned minor)
 {
-	tty_register_devfs(driver, minor);
+	if (!(driver->flags & TTY_DRIVER_NO_DEVFS))
+		tty_register_devfs(driver, minor);
 }
 
 void tty_unregister_device(struct tty_driver *driver, unsigned minor)
 {
-	tty_unregister_devfs(driver, minor);
+	if (!(driver->flags & TTY_DRIVER_NO_DEVFS))
+		tty_unregister_devfs(driver, minor);
 }
 
 EXPORT_SYMBOL(tty_register_device);
@@ -2173,10 +2175,8 @@
 	
 	list_add(&driver->tty_drivers, &tty_drivers);
 	
-	if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) {
-		for(i = 0; i < driver->num; i++)
-		    tty_register_device(driver, driver->minor_start + i);
-	}
+	for (i = 0; i < driver->num; i++)
+		tty_register_device(driver, driver->minor_start + i);
 	proc_tty_register_driver(driver);
 	return error;
 }

  reply	other threads:[~2003-04-21 19:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-21 17:49 [PATCH] 2.5.68-bk1 crash in devfs_remove() for defpts files Pavel Roskin
2003-04-21 17:55 ` Christoph Hellwig
2003-04-21 17:58   ` Christoph Hellwig
2003-04-21 18:53     ` Pavel Roskin
2003-04-21 19:00       ` Christoph Hellwig
2003-04-21 19:44         ` Pavel Roskin
2003-04-21 19:56           ` Christoph Hellwig [this message]
2003-04-21 20:35             ` Pavel Roskin
2003-04-21 20:44               ` Grzegorz Jaskiewicz
2003-04-21 20:56                 ` Pavel Roskin
2003-04-24  7:39                 ` Martin Schlemmer
2003-04-24  7:57                   ` Grzegorz Jaskiewicz
2003-04-24 11:46                     ` Martin Schlemmer
2003-04-24 12:03                       ` Grzegorz Jaskiewicz
2003-04-21 20:57               ` Christoph Hellwig
2003-04-21 21:15                 ` Pavel Roskin
2003-04-21 21:23                   ` Christoph Hellwig
2003-04-21 21:45                     ` Pavel Roskin
2003-04-21 22:25                       ` Christoph Hellwig
2003-04-21 22:37                         ` Pavel Roskin
  -- strict thread matches above, loose matches on Subject: below --
2003-04-22 10:12 Chuck Ebbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030421215637.A30019@lst.de \
    --to=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=proski@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox