[lkml]   [2004]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: 2.6.10-rc1-mm3
    Greg KH <> wrote:
    > So I don't see how that could be failing here. And why I don't see this
    > on my boxes...

    OK, progress. The oops is due to CONFIG_LEGACY_PTY_COUNT=512. I assume
    anything greater than 256 will trigger it.

    - tty_register_driver() calls tty_register_device() for 512 devices.

    - tty_register_device() calls pty_line_name() for the 512 devices, but
    pty_line_name() only understands 256 devices. After that, it starts
    returning duplicated names.

    - class_simple_device_add() gets an -EEXIST return from
    class_device_register() and then tries to kfree local variable s_dev, but
    it's already free. Presumably all that icky refcounting under
    class_device_register() did this for us already. Can you fix this one
    Greg? Just enable slab debugging, set CONFIG_LEGACY_PTY_COUNT=512 and
    watch the fun.

    As for the limitation of 256 legacy ptys: we should either raise it by
    cooking up new device names or limit it to 256 in config. The latter, I
    guess. Is there a requirement to support more than 256 legacy ptys?

    Limit the number of legacy ptys to 256. pty_line_name() isn't capable of
    generating more than 256 unique names.

    Signed-off-by: Andrew Morton <>

    25-akpm/drivers/char/Kconfig | 1 +
    1 files changed, 1 insertion(+)

    diff -puN drivers/char/Kconfig~limit-CONFIG_LEGACY_PTY_COUNT drivers/char/Kconfig
    --- 25/drivers/char/Kconfig~limit-CONFIG_LEGACY_PTY_COUNT 2004-11-08 21:22:46.843719848 -0800
    +++ 25-akpm/drivers/char/Kconfig 2004-11-08 21:23:23.496147832 -0800
    @@ -478,6 +478,7 @@ config LEGACY_PTYS
    int "Maximum number of legacy PTY in use"
    depends on LEGACY_PTYS
    + range 1 256
    default "256"
    The maximum number of legacy PTYs that can be used at any one time.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:07    [W:0.021 / U:7.848 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site