1. 16 3月, 2012 1 次提交
  2. 13 3月, 2012 1 次提交
  3. 09 3月, 2012 7 次提交
  4. 28 2月, 2012 1 次提交
  5. 25 2月, 2012 2 次提交
  6. 04 2月, 2012 1 次提交
  7. 03 2月, 2012 1 次提交
  8. 05 1月, 2012 1 次提交
    • Z
      tty: Fix memory leak in virtual console when enable unicode translation · 106b5fa7
      Zeng Zhaoming 提交于
      Virtual console unicode translation map leaks with following
      message when enable kmemleak:
      
      unreferenced object 0xeb5ec450 (size 192):
        comm "setfont", pid 665, jiffies 4294899028 (age 3696.220s)
        hex dump (first 32 bytes):
          e0 5b 9d eb 00 00 00 00 00 00 00 00 80 b9 ea eb  .[..............
          b0 5a 9d eb 00 00 00 00 00 00 00 00 00 00 00 00  .Z..............
        backtrace:
          [<c1533f8c>] kmemleak_alloc+0x3c/0xa0
          [<c114acc2>] kmem_cache_alloc_trace+0xe2/0x250
          [<c13498e8>] con_clear_unimap+0x78/0xd0
          [<c1345552>] vt_ioctl+0x1562/0x1d00
          [<c133aa00>] tty_ioctl+0x230/0x7c0
          [<c1171519>] do_vfs_ioctl+0x79/0x2d0
          [<c11717df>] sys_ioctl+0x6f/0x80
          [<c156601f>] sysenter_do_call+0x12/0x38
          [<ffffffff>] 0xffffffff
      unreferenced object 0xeb9d5be0 (size 128):
        comm "setfont", pid 660, jiffies 4294899030 (age 3696.212s)
        hex dump (first 32 bytes):
          60 c2 a6 eb 50 c8 a6 eb c0 54 9d eb 80 59 9d eb  `...P....T...Y..
          90 53 9d eb 60 52 9d eb 60 92 9b eb 00 00 00 00  .S..`R..`.......
        backtrace:
          [<c1533f8c>] kmemleak_alloc+0x3c/0xa0
          [<c114acc2>] kmem_cache_alloc_trace+0xe2/0x250
          [<c134938c>] con_insert_unipair+0x7c/0x150
          [<c1349f8c>] con_set_unimap+0x15c/0x1f0
          [<c13456fb>] vt_ioctl+0x170b/0x1d00
          [<c133aa00>] tty_ioctl+0x230/0x7c0
          [<c1171519>] do_vfs_ioctl+0x79/0x2d0
          [<c11717df>] sys_ioctl+0x6f/0x80
          [<c156601f>] sysenter_do_call+0x12/0x38
          [<ffffffff>] 0xffffffff
      
      The leak caused by con_set_default_unimap() not correct free the old map.
      Signed-off-by: NZeng Zhaoming <zengzm.kernel@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      106b5fa7
  9. 01 11月, 2011 1 次提交
  10. 23 9月, 2011 1 次提交
    • G
      keyboard: Do not include <linux/irq.> · 98c2b373
      Geert Uytterhoeven 提交于
      The top of <linux/irq.h> has this comment:
      
       * Please do not include this file in generic code.  There is currently
       * no requirement for any architecture to implement anything held
       * within this file.
       *
       * Thanks. --rmk
      
      Remove inclusion of <linux/irq.>, to prevent the following compile error
      from happening soon:
      
      | include/linux/irq.h:132: error: redefinition of ‘struct irq_data’
      | include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’
      
      drivers/tty/vt/keyboard.c needs to include <asm/irq_regs.h> for get_irq_regs():
      
      | drivers/tty/vt/keyboard.c:497: error: implicit declaration of function ‘get_irq_regs’
      | drivers/tty/vt/keyboard.c:497: warning: initialization makes pointer from integer without a cast
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      98c2b373
  11. 24 8月, 2011 2 次提交
  12. 04 6月, 2011 1 次提交
    • L
      Revert "tty: make receive_buf() return the amout of bytes received" · 55db4c64
      Linus Torvalds 提交于
      This reverts commit b1c43f82.
      
      It was broken in so many ways, and results in random odd pty issues.
      
      It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
      cause endless work-loops (see commit a5660b41: "tty: fix endless
      work loop when the buffer fills up").
      
      It also used an "unsigned int" return value fo the ->receive_buf()
      function, but then made multiple functions return a negative error code,
      and didn't actually check for the error in the caller.
      
      And it didn't actually work at all.  BenH bisected down odd tty behavior
      to it:
        "It looks like the patch is causing some major malfunctions of the X
         server for me, possibly related to PTYs.  For example, cat'ing a
         large file in a gnome terminal hangs the kernel for -minutes- in a
         loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
         data in the quoted bits further down).
      
         ...
      
         Some more data: It -looks- like what happens is that the
         flush_to_ldisc work queue entry constantly re-queues itself (because
         the PTY is full ?) and the workqueue thread will basically loop
         forver calling it without ever scheduling, thus starving the consumer
         process that could have emptied the PTY."
      
      which is pretty much exactly the problem we fixed in a5660b41.
      
      Milton Miller pointed out the 'unsigned int' issue.
      Reported-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Reported-by: NMilton Miller <miltonm@bga.com>
      Cc: Stefan Bigler <stefan.bigler@keymile.com>
      Cc: Toby Gray <toby.gray@realvnc.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      55db4c64
  13. 23 4月, 2011 1 次提交
  14. 20 4月, 2011 6 次提交
  15. 31 3月, 2011 1 次提交
  16. 25 3月, 2011 1 次提交
  17. 02 3月, 2011 1 次提交
  18. 18 2月, 2011 6 次提交
    • A
      tty: now phase out the ioctl file pointer for good · 6caa76b7
      Alan Cox 提交于
      Only oddities here are a couple of drivers that bogusly called the ldisc
      helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes
      away.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6caa76b7
    • J
      tty,vt: fix VT_SETACTIVATE console switch · d6378375
      Jiri Olsa 提交于
      using VT_SETACTIVATE ioctl for console switch did not work,
      since it put wrong param to the set_console function.
      
      Also ioctl returned misleading error, because of the missing
      break statement. I wonder anyone has ever used this one :).
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d6378375
    • J
      tty,vcs removing con_buf/conf_buf_mtx · fcdba07e
      Jiri Olsa 提交于
      seems there's no longer need for using con_buf/conf_buf_mtx
      as vcs_read/vcs_write buffer for user's data.
      
      The do_con_write function, that was the other user of this,
      is currently using its own kmalloc-ed buffer.
      
      Not sure when this got changed, as I was able to find this code
      in 2.6.9, but it's already gone as far as current git history
      goes - 2.6.12-rc2.
      
      AFAICS there's a behaviour change with the current change.
      The lseek is not completely mutually exclusive with the
      vcs_read/vcs_write - the file->f_pos might get updated
      via lseek callback during the vcs_read/vcs_write processing.
      
      I tried to find out if the prefered behaviour is to keep
      this in sync within read/write/lseek functions, but I did
      not find any pattern on different places.
      
      I guess if user end up calling write/lseek from different
      threads she should know what she's doing. If needed we
      could use dedicated fd mutex/buffer.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fcdba07e
    • J
      tty,vcs: lseek/VC-release race fix · dc1892c4
      Jiri Olsa 提交于
      there's a race between vcs's lseek handler and VC release.
      
      The lseek handler does not hold console_lock and touches
      VC's size info. If during this the VC got released, there's
      an access violation.
      
      Following program triggers the issue for me:
      
      [SNIP]
      #define _BSD_SOURCE
      #include <stdio.h>
      #include <sys/types.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      #include <sys/ioctl.h>
      #include <linux/vt.h>
      #include <unistd.h>
      #include <errno.h>
      
      static int run_seek(void)
      {
              while(1) {
                      int fd;
                      fd = open("./vcs30", O_RDWR);
                      while(lseek(fd, 0, 0) != -1);
                      close(fd);
              }
      }
      
      static int open_ioctl_tty(void)
      {
              return open("/dev/tty1", O_RDWR);
      }
      
      static int do_ioctl(int fd, int req, int i)
      {
              return ioctl(fd, req, i);
      }
      
      #define INIT(i) do_ioctl(ioctl_fd, VT_ACTIVATE, i)
      #define SHUT(i) do_ioctl(ioctl_fd, VT_DISALLOCATE, i)
      
      int main(int argc, char **argv)
      {
              int ioctl_fd = open_ioctl_tty();
      
              if (ioctl < 0) {
                      perror("open tty1 failed\n");
                      return -1;
              }
      
              if ((-1 == mknod("vcs30", S_IFCHR|0666, makedev(7, 30))) &&
                  (errno != EEXIST)) {
                      printf("errno %d\n", errno);
                      perror("failed to create vcs30");
                      return -1;
              }
      
              do_ioctl(ioctl_fd, VT_LOCKSWITCH, 0);
      
              if (!fork())
                      run_seek();
      
              while(1) {
                      INIT(30);
                      SHUT(30);
              }
      
              return 0;
      }
      [SNIP]
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      dc1892c4
    • M
      TTY: use appropriate printk priority level · 1ffdda95
      Mandeep Singh Baines 提交于
      printk()s without a priority level default to KERN_WARNING. To reduce
      noise at KERN_WARNING, this patch set the priority level appriopriately
      for unleveled printks()s. This should be useful to folks that look at
      dmesg warnings closely.
      Signed-off-by: NMandeep Singh Baines <msb@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1ffdda95
    • A
      vt: Add virtual console keyboard mode OFF · 9fc3de9c
      Arthur Taylor 提交于
      virtual console: add keyboard mode OFF
      
      Add a new mode for the virtual console keyboard OFF in which all input
      other than shift keys is ignored. Prevents vt input buffers from
      overflowing when a program opens but doesn't read from a tty, like X11
      using evdev for input.
      Signed-off-by: NArthur Taylor <art@ified.ca>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9fc3de9c
  19. 26 1月, 2011 1 次提交
    • T
      console: rename acquire/release_console_sem() to console_lock/unlock() · ac751efa
      Torben Hohn 提交于
      The -rt patches change the console_semaphore to console_mutex.  As a
      result, a quite large chunk of the patches changes all
      acquire/release_console_sem() to acquire/release_console_mutex()
      
      This commit makes things use more neutral function names which dont make
      implications about the underlying lock.
      
      The only real change is the return value of console_trylock which is
      inverted from try_acquire_console_sem()
      
      This patch also paves the way to switching console_sem from a semaphore to
      a mutex.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
      Signed-off-by: NTorben Hohn <torbenh@gmx.de>
      Cc: Thomas Gleixner <tglx@tglx.de>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac751efa
  20. 23 1月, 2011 2 次提交
  21. 17 12月, 2010 1 次提交