1. 27 3月, 2013 1 次提交
  2. 23 2月, 2013 1 次提交
  3. 09 3月, 2012 1 次提交
  4. 01 11月, 2011 1 次提交
  5. 20 4月, 2011 1 次提交
  6. 02 3月, 2011 1 次提交
  7. 18 2月, 2011 2 次提交
    • 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
  8. 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
  9. 12 11月, 2010 1 次提交
  10. 05 11月, 2010 1 次提交
  11. 23 10月, 2010 2 次提交
    • N
      vcs: invoke the vt update callback when /dev/vcs* is written to · 432c9ed2
      Nicolas Pitre 提交于
      A notifier chain is called whenever the vt code modifies a terminal
      content, except for one case which is when the modification comes
      through writes to /dev/vcs* devices.  Let's add the missing notifier
      invocation at the end of vcs_write() for that case too.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@canonical.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      432c9ed2
    • N
      vcs: add poll/fasync support · 47725ac7
      Nicolas Pitre 提交于
      The /dev/vcs* devices are used, amongst other things, by accessibility
      applications such as BRLTTY to display the screen content onto refreshable
      braille displays.  Currently this is performed by constantly reading from
      /dev/vcsa0 whether or not the screen content has changed.  Given the
      default braille refresh rate of 25 times per second, this easily qualifies
      as the biggest source of wake-up events preventing laptops from entering
      deeper power saving states.
      
      To avoid this periodic polling, let's add support for select()/poll() and
      SIGIO with the /dev/vcs* devices.  The implemented semantic is to report
      data availability whenever the corresponding vt has seen some update after
      the last read() operation.  The application still has to lseek() back
      as usual in order to read() the new data.
      
      Not to create unwanted overhead, the needed data structure is allocated
      and the vt notification callback is registered only when the poll or
      fasync method is invoked for the first time per file instance.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@canonical.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      47725ac7
  12. 11 8月, 2010 1 次提交
  13. 21 7月, 2009 1 次提交
  14. 25 3月, 2009 1 次提交
    • K
      vcs: hook sysfs devices into object lifetime instead of "binding" · 4995f8ef
      Kay Sievers 提交于
      During bootup performance tracing I noticed many occurrences of
      vca* device creation and removal, leading to the usual userspace
      uevent processing, which are, in this case, rather pointless.
      
      A simple test showing the kernel timing (not including all the
      work userspace has to do), gives us these numbers:
        $ time for i in `seq 1000`; do echo a > /dev/tty2; done
        real    0m1.142s
        user    0m0.015s
        sys     0m0.540s
      
      If we move the hook for the vcs* driver core devices from the
      tty "binding" to the vc allocation/deallocation, which is what
      the vcs* devices represent, we get the following numbers:
        $ time for i in `seq 1000`; do echo a > /dev/tty2; done
        real    0m0.152s
        user    0m0.030s
        sys     0m0.072s
      
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4995f8ef
  15. 17 10月, 2008 1 次提交
  16. 22 7月, 2008 1 次提交
  17. 21 6月, 2008 1 次提交
  18. 09 5月, 2007 2 次提交
  19. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  20. 09 12月, 2006 1 次提交
  21. 02 12月, 2006 1 次提交
  22. 30 9月, 2006 1 次提交
  23. 04 7月, 2006 1 次提交
  24. 01 7月, 2006 1 次提交
  25. 27 6月, 2006 3 次提交
  26. 30 12月, 2005 1 次提交
    • D
      [PATCH] fix ia64 compile failure with gcc4.1 · ee025949
      Dave Jones 提交于
      __get_unaligned creates a typeof the var its passed, and writes to it,
      which on gcc4.1, spits out the following error:
      
      drivers/char/vc_screen.c: In function 'vcs_write':
      drivers/char/vc_screen.c:422: error: assignment of read-only variable 'val'
      Signed-off-by: NDave Jones <davej@redhat.com>
      [ The "right" fix would be to try to fix <asm-generic/unaligned.h>
        but that's hard to do with the tools gcc gives us. So this
        simpler patch is preferable -- Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ee025949
  27. 29 10月, 2005 1 次提交
  28. 21 6月, 2005 1 次提交
  29. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4