1. 10 2月, 2012 3 次提交
  2. 03 2月, 2012 8 次提交
  3. 27 1月, 2012 2 次提交
  4. 25 1月, 2012 3 次提交
    • K
      tty: rework pty count limiting · e9aba515
      Konstantin Khlebnikov 提交于
      After adding devpts multiple-insrances sysctl kernel.pty.max limit pty count for
      each devpts instance independently, while kernel.pty.nr shows total pty count.
      
      This patch restores sysctl kernel.pty.max as global limit (4096 by default),
      adds pty reseve for main devpts (mounted without "newinstance" argument),
      and new sysctl to tune it: kernel.pty.reserve (1024 by default)
      
      Also it adds devpts mount option "max=%d" to limit pty count for each devpts
      instance independently. (by default NR_UNIX98_PTY_MAX == 2^20)
      
      Thus devpts instances in containers cannot eat up all available pty even if we didn't
      set any limits, while with "max" argument we can adjust limits more precisely.
      
      Plus, now open("/dev/ptmx") return -ENOSPC in case lack of pty indexes,
      this is more informative than -EIO.
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9aba515
    • K
      tty: move pty count limiting into devpts · a4834c10
      Konstantin Khlebnikov 提交于
      Let's move this stuff to the better place, where we can account pty right in
      tty-indexes managing code.
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a4834c10
    • K
      tty: cleanup prohibition of direct opening for unix98 pty master · 593a27c4
      Konstantin Khlebnikov 提交于
      cleanup hack added in v2.6.27-3203-g15582d36
      
      comment from that patch:
      
      : pty: If the administrator creates a device for a ptmx slave we should not error
      :
      : The open path for ptmx slaves is via the ptmx device. Opening them any
      : other way is not allowed. Vegard Nossum found that previously this was not
      : the case and mknod foo c 128 42; cat foo would produce nasty diagnostics
      :
      : Signed-off-by: Alan Cox <alan@redhat.com>
      : Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
      
      devpts_get_tty() returns non-null only for inodes on devpts, but there is no
      inodes for master-devices, /dev/ptmx (/dev/pts/ptmx) is the only way to open them.
      Thus we can completely forbid lookup for master-devices and eliminate that hack in
      tty_init_dev() because tty_open() will get EIO from tty_driver_lookup_tty().
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      593a27c4
  5. 20 1月, 2012 10 次提交
  6. 19 1月, 2012 14 次提交