1. 13 10月, 2007 2 次提交
  2. 13 7月, 2007 1 次提交
    • A
      USB: prevent char device open/deregister race · d4ead16f
      Alan Stern 提交于
      This patch (as908) adds central protection in usbcore for the
      prototypical race between opening and unregistering a char device.
      The spinlock used to protect the minor-numbers array is replaced with
      an rwsem, which can remain locked across a call to a driver's open()
      method.  This guarantees that open() and deregister() will be mutually
      exclusive.
      
      The private locks currently used in several individual drivers for
      this purpose are no longer necessary, and the patch removes them.  The
      following USB drivers are affected: usblcd, idmouse, auerswald,
      legousbtower, sisusbvga/sisusb, ldusb, adutux, iowarrior, and
      usb-skeleton.
      
      As a side effect of this change, usb_deregister_dev() must not be
      called while holding a lock that is acquired by open().  Unfortunately
      a number of drivers do this, but luckily the solution is simple: call
      usb_deregister_dev() before acquiring the lock.
      
      In addition to these changes (and their consequent code
      simplifications), the patch fixes a use-after-free bug in adutux and a
      race between open() and release() in iowarrior.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d4ead16f
  3. 09 5月, 2007 2 次提交
  4. 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
  5. 06 1月, 2007 1 次提交
    • A
      sisusb_con warning fixes · c067dfc6
      Andrew Morton 提交于
      x86_64:
      
      drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putc':
      drivers/usb/misc/sisusbvga/sisusb_con.c:405: warning: cast from pointer to integer of different size
      drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putcs':
      drivers/usb/misc/sisusbvga/sisusb_con.c:440: warning: cast from pointer to integer of different size
      drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_clear':
      drivers/usb/misc/sisusbvga/sisusb_con.c:494: warning: cast from pointer to integer of different size
      drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_bmove':
      drivers/usb/misc/sisusbvga/sisusb_con.c:566: warning: cast from pointer to integer of different size
      drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_switch':
      drivers/usb/misc/sisusbvga/sisusb_con.c:614: warning: cast from pointer to integer of different size
      drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_scroll_area':
      drivers/usb/misc/sisusbvga/sisusb_con.c:941: warning: cast from pointer to integer of different size
      
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c067dfc6
  6. 04 10月, 2006 1 次提交
  7. 22 6月, 2006 2 次提交
  8. 09 11月, 2005 1 次提交
    • O
      [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason · 733482e4
      Olaf Hering 提交于
      This patch removes almost all inclusions of linux/version.h.  The 3
      #defines are unused in most of the touched files.
      
      A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
      unfortunatly in linux/version.h.
      
      There are also lots of #ifdef for long obsolete kernels, this was not
      touched.  In a few places, the linux/version.h include was move to where
      the LINUX_VERSION_CODE was used.
      
      quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
      
      search pattern:
      /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      733482e4
  9. 13 9月, 2005 1 次提交
    • T
      [PATCH] USB: sisusb[vga] update · 1bbb4f20
      Thomas Winischhofer 提交于
      here is a new and extended version of the sisusbvga (previously: sisusb)
      driver. The patch is against 2.6.13 and updates the driver to version 0.0.8.
      
      Additions include complete VGA/EGA text console support and a build-in
      display mode infrastructure for userland applications that don't know
       about the graphics internals.
      
      Fixes include some BE/LE issues and a get/put_dev bug in the previous
      version.
      
      Other changes include a change of the module name from "sisusb" to
      "sisusbvga". The previous one was too generic IMHO.
      
      Please note that the patch also affects the Makefile in
      drivers/video/console as the driver requires the VGA 8x16 font in case
      the text console part is selected.
      
      Heavily tested, as usual. Please apply.
      
      One thing though: I already prepared for removal of the "mode" field and
      the changed "name" field in the usb_class_driver structure. This will
      perhaps need some refinement depending on whether you/Linus merge the
      respective core changes before or after 2.6.14.
      Signed-off-by: NThomas Winischhofer <thomas@winischhofer.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1bbb4f20