lkml.org 
[lkml]   [2003]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] 2.5.68-bk1 crash in devfs_remove() for defpts files
On Mon, Apr 21, 2003 at 04:35:21PM -0400, Pavel Roskin wrote:
> > 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:
>
> Applied. Now I can log in by ssh and there are no problems with
> pseudoterminals. However, all local terminals are gone:

The devfs <-> tty interaction are going to drive me nuts.

TTY_DRIVER_NO_DEVFS actually means don't call tty_register_device
in tty_register_driver, not don't register with devfs.

Updated patch (replaces the last one):


--- 1.78/drivers/char/tty_io.c Sat Apr 19 19:24:04 2003
+++ edited/drivers/char/tty_io.c Mon Apr 21 21:28:01 2003
@@ -2173,9 +2173,9 @@

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);
+ if (!(driver->flags & TTY_DRIVER_NO_DEVFS)) {
+ for (i = 0; i < driver->num; i++)
+ tty_register_device(driver, driver->minor_start + i);
}
proc_tty_register_driver(driver);
return error;
@@ -2215,7 +2215,8 @@
driver->termios_locked[i] = NULL;
kfree(tp);
}
- tty_unregister_device(driver, driver->minor_start + i);
+ if (!(driver->flags & TTY_DRIVER_NO_DEVFS))
+ tty_unregister_device(driver, driver->minor_start + i);
}
proc_tty_unregister_driver(driver);
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.079 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site