linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [Bug 3736] Bug in tty_io.c after changes between 2.6.9-rc1-bk1 and 2.6.9-rc1-bk2
@ 2005-01-24  6:50 Andris Pavenis
  0 siblings, 0 replies; only message in thread
From: Andris Pavenis @ 2005-01-24  6:50 UTC (permalink / raw)
  To: viro; +Cc: linux-kernel

Tried to fix a bug 
 http://bugzilla.kernel.org/show_bug.cgi?id=3736
which appeared between kernels 2.6.9-rc1-bk1 and 2.6.9-rc1-bk2.

Suceeded to localize it to part of changes in drivers/char/tty_io.c.
I guess changes were according changelog:
 
-----------------------------------
ChangeSet@1.1843.2.184, 2004-08-24 12:29:18-07:00, 
viro@parcelfarce.linux.theplanet.co.uk
  [PATCH] /dev/ptmx open() fixes
  
  If tty_open() fails for a normal serial device, we end up doing cleanups
  that should only happen for failed open of /dev/ptmx.  The results are
  not pretty - devpts et.al.  end up very confused.  That's what gave
  problems with ptmx.
  
  This splits ptmx file_operations from the normal case and cleans up both
  tty_open() and (new) ptmx_open().  Survived serious beating.
-----------------------------------

Finally located that a problem seems to be a simple typo (

--- linux-2.6.10/drivers/char/tty_io.c~1 2004-12-24 23:34:58.000000000 +0200
+++ linux-2.6.10/drivers/char/tty_io.c 2005-01-22 10:54:32.000000000 +0200
@@ -1148,7 +1148,7 @@ static inline void pty_line_name(struct 
  int i = index + driver->name_base;
  /* ->name is initialized to "ttyp", but "tty" is expected */
  sprintf(p, "%s%c%x",
-   driver->subtype == PTY_TYPE_SLAVE ? "tty" : driver->name,
+   driver->subtype == PTY_TYPE_SLAVE ? "pty" : driver->name,
    ptychar[i >> 4 & 0xf], i & 0xf);
 }
 
At least as I tested, it fixes the problem on one of systems on which I 
tested.

Andris

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-24  6:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-24  6:50 [PATCH] [Bug 3736] Bug in tty_io.c after changes between 2.6.9-rc1-bk1 and 2.6.9-rc1-bk2 Andris Pavenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).