1. 14 Feb, 2010 1 commit
  2. 28 Jan, 2010 1 commit
    • Frederic Weisbecker's avatar
      reiserfs: Fix vmalloc call under reiserfs lock · bbec9191
      Frederic Weisbecker authored
      Vmalloc is called to allocate journal->j_cnode_free_list but
      we hold the reiserfs lock at this time, which raises a
      {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} lock inversion.
      
      Just drop the reiserfs lock at this time, as it's not even
      needed but kept for paranoid reasons.
      
      This fixes:
      
      [ INFO: inconsistent lock state ]
      2.6.33-rc5 #1
      ---------------------------------
      inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.
      kswapd0/313 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (&REISERFS_SB(s)->lock){+.+.?.}, at: [<c11118c8>]
      reiserfs_write_lock_once+0x28/0x50
      {RECLAIM_FS-ON-W} state was registered at:
        [<c104ee32>] mark_held_locks+0x62/0x90
        [<c104eefa>] lockdep_trace_alloc+0x9a/0xc0
        [<c108f7b6>] kmem_cache_alloc+0x26/0xf0
        [<c108621c>] __get_vm_area_node+0x6c/0xf0
        [<c108690e>] __vmalloc_node+0x7e/0xa0
        [<c1086aab>] vmalloc+0x2b/0x30
        [<c110e1fb>] journal_init+0x6cb/0xa10
        [<c10f90a2>] reiserfs_fill_super+0x342/0xb80
        [<c1095665>] get_sb_bdev+0x145/0x180
        [<c10f68e1>] get_super_block+0x21/0x30
        [<c1094520>] vfs_kern_mount+0x40/0xd0
        [<c1094609>] do_kern_mount+0x39/0xd0
        [<c10aaa97>] do_mount+0x2c7/0x6d0
        [<c10aaf06>] sys_mount+0x66/0xa0
        [<c16198a7>] mount_block_root+0xc4/0x245
        [<c1619a81>] mount_root+0x59/0x5f
        [<c1619b98>] prepare_namespace+0x111/0x14b
        [<c1619269>] kernel_init+0xcf/0xdb
        [<c100303a>] kernel_thread_helper+0x6/0x1c
      irq event stamp: 63236801
      hardirqs last  enabled at (63236801): [<c134e7fa>]
      __mutex_unlock_slowpath+0x9a/0x120
      hardirqs last disabled at (63236800): [<c134e799>]
      __mutex_unlock_slowpath+0x39/0x120
      softirqs last  enabled at (63218800): [<c102f451>] __do_softirq+0xc1/0x110
      softirqs last disabled at (63218789): [<c102f4ed>] do_softirq+0x4d/0x60
      
      other info that might help us debug this:
      2 locks held by kswapd0/313:
       #0:  (shrinker_rwsem){++++..}, at: [<c1074bb4>] shrink_slab+0x24/0x170
       #1:  (&type->s_umount_key#19){++++..}, at: [<c10a2edd>]
      shrink_dcache_memory+0xfd/0x1a0
      
      stack backtrace:
      Pid: 313, comm: kswapd0 Not tainted 2.6.33-rc5 #1
      Call Trace:
       [<c134db2c>] ? printk+0x18/0x1c
       [<c104e7ef>] print_usage_bug+0x15f/0x1a0
       [<c104ebcf>] mark_lock+0x39f/0x5a0
       [<c104d66b>] ? trace_hardirqs_off+0xb/0x10
       [<c1052c50>] ? check_usage_forwards+0x0/0xf0
       [<c1050c24>] __lock_acquire+0x214/0xa70
       [<c10438c5>] ? sched_clock_cpu+0x95/0x110
       [<c10514fa>] lock_acquire+0x7a/0xa0
       [<c11118c8>] ? reiserfs_write_lock_once+0x28/0x50
       [<c134f03f>] mutex_lock_nested+0x5f/0x2b0
       [<c11118c8>] ? reiserfs_write_lock_once+0x28/0x50
       [<c11118c8>] ? reiserfs_write_lock_once+0x28/0x50
       [<c11118c8>] reiserfs_write_lock_once+0x28/0x50
       [<c10f05b0>] reiserfs_delete_inode+0x50/0x140
       [<c10a653f>] ? generic_delete_inode+0x5f/0x150
       [<c10f0560>] ? reiserfs_delete_inode+0x0/0x140
       [<c10a657c>] generic_delete_inode+0x9c/0x150
       [<c10a666d>] generic_drop_inode+0x3d/0x60
       [<c10a5597>] iput+0x47/0x50
       [<c10a2a4f>] dentry_iput+0x6f/0xf0
       [<c10a2af4>] d_kill+0x24/0x50
       [<c10a2d3d>] __shrink_dcache_sb+0x21d/0x2b0
       [<c10a2f0f>] shrink_dcache_memory+0x12f/0x1a0
       [<c1074c9e>] shrink_slab+0x10e/0x170
       [<c1075177>] kswapd+0x477/0x6a0
       [<c1072d10>] ? isolate_pages_global+0x0/0x1b0
       [<c103e160>] ? autoremove_wake_function+0x0/0x40
       [<c1074d00>] ? kswapd+0x0/0x6a0
       [<c103de6c>] kthread+0x6c/0x80
       [<c103de00>] ? kthread+0x0/0x80
       [<c100303a>] kernel_thread_helper+0x6/0x1c
      Reported-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Christian Kujau <lists@nerdbynature.de>
      Cc: Chris Mason <chris.mason@oracle.com>
      bbec9191
  3. 21 Jan, 2010 21 commits
  4. 20 Jan, 2010 17 commits
    • Lothar Wassmann's avatar
      USB: isp1362: fix build failure on ARM systems via irq_flags cleanup · 0a2fea2e
      Lothar Wassmann authored
      There was some left over #ifdef ARM logic that is outdated but no one
      really noticed.  So instead of relying on this tricky logic, properly
      load and utilize the platform irq_flags resources.
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarLothar Wassmann <LW@KARO-electronics.de>
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0a2fea2e
    • Lothar Wassmann's avatar
      USB: isp1362: better 64bit printf warning fixes · 96b85179
      Lothar Wassmann authored
      Some hosts that treat the return value of sizeof differently from unsigned
      long might still hit warnings.  So use %zu for sizeof() values.  This is a
      better version of the previous commit b0a9cf29.
      Signed-off-by: default avatarLothar Wassmann <LW@KARO-electronics.de>
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      96b85179
    • Ryan May's avatar
      USB: fix usbstorage for 2770:915d delivers no FAT · 10d2cdb6
      Ryan May authored
      Resolves kernel.org bug 14914.
      
      Remove entry for 2770:915d (usb digital camera with mass storage
      support) from unusual_devs.h. The fix triggered by the entry causes
      the file system on the camera to be completely inaccessible (no
      partition table, the device is not mountable).
      
      The patch works, but let me clarify a few things about it.  All the
      patch does is remove the entry for this device from the
      drivers/usb/storage/unusual_devs.h, which is supposed to help with a
      problem with the device's reported size (I think).  I'm pretty sure it
      was originally added for a reason, so I'm not sure removing it won't
      cause other problems to reappear.  Also, I should note that this
      unusual_devs.h entry was present (and activating workarounds) in
      2.6.29, but in that version everything works fine.  Starting with
      2.6.30, things no longer work.
      Signed-off-by: default avatarRyan May <rmay31@gmail.com>
      Cc: Rohan Hart <rohan.hart17@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      10d2cdb6
    • Colin Tuckley's avatar
      USB: Fix level of isp1760 Reloading ptd error message · c0d74142
      Colin Tuckley authored
      This error message is not actually an error, it's an information
      message. It is triggered when a transfer which ended in a NAQ is
      retried successfully by the hardware.
      Signed-off-by: default avatarColin Tuckley <colin.tuckley@arm.com>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c0d74142
    • Alexander Beregalov's avatar
      USB: FHCI: avoid NULL pointer dereference · ae35fe9e
      Alexander Beregalov authored
      Assign fhci only if usb is not NULL.
      Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ae35fe9e
    • Sarah Sharp's avatar
      USB: Fix duplicate sysfs problem after device reset. · 04a723ea
      Sarah Sharp authored
      Borislav Petkov reports issues with duplicate sysfs endpoint files after a
      resume from a hibernate.  It turns out that the code to support alternate
      settings under xHCI has issues when a device with a non-default alternate
      setting is reset during the hibernate:
      
      [  427.681810] Restarting tasks ...
      [  427.681995] hub 1-0:1.0: state 7 ports 6 chg 0004 evt 0000
      [  427.682019] usb usb3: usb resume
      [  427.682030] ohci_hcd 0000:00:12.0: wakeup root hub
      [  427.682191] hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s
      [  427.682205] usb 1-2: usb wakeup-resume
      [  427.682226] usb 1-2: finish reset-resume
      [  427.682886] done.
      [  427.734658] ehci_hcd 0000:00:12.2: port 2 high speed
      [  427.734663] ehci_hcd 0000:00:12.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
      [  427.746682] hub 3-0:1.0: hub_reset_resume
      [  427.746693] hub 3-0:1.0: trying to enable port power on non-switchable hub
      [  427.786715] usb 1-2: reset high speed USB device using ehci_hcd and address 2
      [  427.839653] ehci_hcd 0000:00:12.2: port 2 high speed
      [  427.839666] ehci_hcd 0000:00:12.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
      [  427.847717] ohci_hcd 0000:00:12.0: GetStatus roothub.portstatus [1] = 0x00010100 CSC PPS
      [  427.915497] hub 1-2:1.0: remove_intf_ep_devs: if: ffff88022f9e8800 ->ep_devs_created: 1
      [  427.915774] hub 1-2:1.0: remove_intf_ep_devs: bNumEndpoints: 1
      [  427.915934] hub 1-2:1.0: if: ffff88022f9e8800: endpoint devs removed.
      [  427.916158] hub 1-2:1.0: create_intf_ep_devs: if: ffff88022f9e8800 ->ep_devs_created: 0, ->unregistering: 0
      [  427.916434] hub 1-2:1.0: create_intf_ep_devs: bNumEndpoints: 1
      [  427.916609]  ep_81: create, parent hub
      [  427.916632] ------------[ cut here ]------------
      [  427.916644] WARNING: at fs/sysfs/dir.c:477 sysfs_add_one+0x82/0x96()
      [  427.916649] Hardware name: System Product Name
      [  427.916653] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2:1.0/ep_81'
      [  427.916658] Modules linked in: binfmt_misc kvm_amd kvm powernow_k8 cpufreq_ondemand cpufreq_powersave cpufreq_userspace freq_table cpufreq_conservative ipv6 vfat fat
      +8250_pnp 8250 pcspkr ohci_hcd serial_core k10temp edac_core
      [  427.916694] Pid: 278, comm: khubd Not tainted 2.6.33-rc2-00187-g08d869aa-dirty #13
      [  427.916699] Call Trace:
      
      The problem is caused by a mismatch between the USB core's view of the
      device state and the USB device and xHCI host's view of the device state.
      
      After the device reset and re-configuration, the device and the xHCI host
      think they are using alternate setting 0 of all interfaces.  However, the
      USB core keeps track of the old state, which may include non-zero
      alternate settings.  It uses intf->cur_altsetting to keep the endpoint
      sysfs files for the old state across the reset.
      
      The bandwidth allocation functions need to know what the xHCI host thinks
      the current alternate settings are, so original patch set
      intf->cur_altsetting to the alternate setting 0.  This caused duplicate
      endpoint files to be created.
      
      The solution is to not set intf->cur_altsetting before calling
      usb_set_interface() in usb_reset_and_verify_device().  Instead, we add a
      new flag to struct usb_interface to tell usb_hcd_alloc_bandwidth() to use
      alternate setting 0 as the currently installed alternate setting.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: default avatarBorislav Petkov <petkovbb@googlemail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      04a723ea
    • Greg Kroah-Hartman's avatar
      USB: add speed values for USB 3.0 and wireless controllers · b132b04e
      Greg Kroah-Hartman authored
      These controllers say "unknown" for their speed in sysfs, which
      obviously isn't correct.
      Reported-by: default avatarKurt Garloff <garloff@novell.com>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b132b04e
    • Alan Stern's avatar
      USB: add missing delay during remote wakeup · 49d0f078
      Alan Stern authored
      This patch (as1330) fixes a bug in khbud's handling of remote
      wakeups.  When a device sends a remote-wakeup request, the parent hub
      (or the host controller driver, for directly attached devices) begins
      the resume sequence and notifies khubd when the sequence finishes.  At
      this point the port's SUSPEND feature is automatically turned off.
      
      However the device needs an additional 10-ms resume-recovery time
      (TRSMRCY in the USB spec).  Khubd does not wait for this delay if the
      SUSPEND feature is off, and as a result some devices fail to behave
      properly following a remote wakeup.  This patch adds the missing
      delay to the remote-wakeup path.
      
      It also extends the resume-signalling delay used by ehci-hcd and
      uhci-hcd from 20 ms (the value in the spec) to 25 ms (the value we use
      for non-remote-wakeup resumes).  The extra time appears to help some
      devices.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Cc: Rickard Bellini <rickard.bellini@ericsson.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      49d0f078
    • Alan Stern's avatar
      USB: EHCI & UHCI: fix race between root-hub suspend and port resume · cec3a53c
      Alan Stern authored
      This patch (as1321) fixes a problem with EHCI and UHCI root-hub
      suspends: If the suspend occurs while a port is trying to resume, the
      resume doesn't finish and simply gets lost.  When remote wakeup is
      enabled, this is undesirable behavior.
      
      The patch checks first to see if any port resumes are in progress, and
      if they are then it fails the root-hub suspend with -EBUSY.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      cec3a53c
    • Alan Stern's avatar
      USB: EHCI: fix handling of unusual interrupt intervals · 1b9a38bf
      Alan Stern authored
      This patch (as1320) fixes two problems related to interrupt-URB
      scheduling in ehci-hcd.
      
      	URBs with an interval of 2 or 4 microframes aren't handled.
      	For the time being, the patch reduces to interval to 1 uframe.
      
      	URBs are constrained to have an interval no larger than 1024
      	frames by usb_submit_urb().  But some EHCI controllers allow
      	use of a schedule as short as 256 frames; for these
      	controllers we may have to decrease the interval to the
      	actual schedule length.
      
      The second problem isn't very significant since few devices expose
      interrupt endpoints with an interval larger than 256 frames.  But the
      first problem is critical; it will prevent the kernel from working
      with devices having interrupt intervals of 2 or 4 uframes.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Tested-by: default avatarGlynn Farrow <farrowg@sg.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1b9a38bf
    • Oliver Neukum's avatar
      USB: Don't use GFP_KERNEL while we cannot reset a storage device · acbe2feb
      Oliver Neukum authored
      Memory allocations with GFP_KERNEL can cause IO to a storage
      device which can fail resulting in a need to reset the device.
      Therefore GFP_KERNEL cannot be safely used between usb_lock_device()
      and usb_unlock_device(). Replace by GFP_NOIO.
      Signed-off-by: default avatarOliver Neukum <oliver@neukum.org>
      Cc: stable <stable@kernel.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      acbe2feb
    • Alan Stern's avatar
      USB: fix bitmask merge error · a91b593e
      Alan Stern authored
      This patch adds a mask bit which was mistakenly omitted from the
      as1311 patch (usb-storage: add BAD_SENSE flag).
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a91b593e
    • Johan Hovold's avatar
      usb: serial: fix memory leak in generic driver · 25915302
      Johan Hovold authored
      Fix a regression introduced by commit
      715b1dc0 ("USB: usb_debug,
      usb_generic_serial: implement multi urb write").
      
      URB transfer buffer was never freed when using multi-urb writes. 
      Currently the only driver enabling multi-urb writes is usb_debug.
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Acked-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      25915302
    • Stefani Seibold's avatar
      USB: serial: fix USB serial fix kfifo_len locking · 25719e6b
      Stefani Seibold authored
      This patch fix a possible race bug in drivers/usb/serial/generic with
      the new kfifo API.
      
      Please apply it to the 2.6.33-rc* tree.
      Signed-off-by: default avatarStefani Seibold <stefani@seibold.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      25719e6b
    • Greg Kroah-Hartman's avatar
      Staging: hv: fix smp problems in the hyperv core code · 7692fd4d
      Greg Kroah-Hartman authored
      This fixes a number of SMP problems that were in the hyperv core code.
      
      Patch originally written by K. Y. Srinivasan <ksrinivasan@novell.com>
      but forward ported to the latest in-kernel code and tweaked slightly by
      me.
      
      Novell, Inc. hereby disclaims all copyright in any derivative work
      copyright associated with this patch.
      Signed-off-by: default avatarK. Y. Srinivasan <ksrinivasan@novell.com>
      Cc: Hank Janssen <hjanssen@microsoft.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>.
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7692fd4d
    • Alan Cox's avatar
      Staging: et131x: Fix 2.6.33rc1 regression in et131x · d31a2ff0
      Alan Cox authored
      et131x: Fix 12bit wrapping
      
      From: Alan Cox <alan@linux.intel.com>
      
      The 12bit wrap logic conversion is wrong and this shows up for some
      memory sizes and layouts of card. Patch it up for now, once the kernel
      view of status is cleaned up it'll become two variables and a lot saner.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d31a2ff0
    • Eugeni Dodonov's avatar
      Staging: asus_oled: fix oops in 2.6.32.2 · 20633bf0
      Eugeni Dodonov authored
      After updating to 2.6.32 kernel, I started experiencing Oopses caused by
      the asus_oled module. After quick investigation, I wrapped this simple
      patch which fixes an Oops in by asus_oled module on 2.6.32.2 kernel,
      caused by incorrect usage of strict_strtoul function call within
      set_enabled and set_disabled functions. This can be triggered by simple
      running the userspace client for asus_old (e.g., 'asusoled -e' or
      'asusoled -d').
      Signed-off-by: default avatarEugeni Dodonov <eugeni@mandriva.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      20633bf0