1. 23 4月, 2011 1 次提交
  2. 20 4月, 2011 6 次提交
  3. 31 3月, 2011 1 次提交
  4. 25 3月, 2011 1 次提交
  5. 02 3月, 2011 1 次提交
  6. 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
  7. 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
  8. 23 1月, 2011 2 次提交
  9. 17 12月, 2010 1 次提交
  10. 12 11月, 2010 1 次提交
  11. 06 11月, 2010 1 次提交
  12. 05 11月, 2010 1 次提交