Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Mar 17, 2012
  1. Linux

    Willy Tarreau committed
    Signed-off-by: Willy Tarreau <>
  2. @dvrabel

    blkfront: Fix backtrace in del_gendisk

    dvrabel committed with Willy Tarreau
    Commit 89de166 upstream.
    The call to del_gendisk follows an non-refcounted gd->queue
    pointer. We release the last ref in blk_cleanup_queue. Fixed by
    reordering releases accordingly.
    Signed-off-by: Daniel Stodden <>
    Signed-off-by: Jeremy Fitzhardinge <>
    Signed-off-by: David Vrabel <>
    Signed-off-by: Willy Tarreau <>
  3. watchdog: hpwdt: clean up set_memory_x call for 32 bit

    Maxim Uvarov committed with Willy Tarreau
    commit 97d2a10 upstream.
    1. address has to be page aligned.
    2. set_memory_x uses page size argument, not size.
    Bug causes with following commit:
    	commit da28179b4e90dda56912ee825c7eaa62fc103797
    	Author: Mingarelli, Thomas <>
    	Date:   Mon Nov 7 10:59:00 2011 +0100
         watchdog: hpwdt: Changes to handle NX secure bit in 32bit path
        commit e67d668 upstream.
        This patch makes use of the set_memory_x() kernel API in order
        to make necessary BIOS calls to source NMIs.
    Signed-off-by: Maxim Uvarov <>
    Signed-off-by: Wim Van Sebroeck <>
    Cc: stable <>
    Signed-off-by: Willy Tarreau <>
  4. regset: Return -EFAULT, not -EIO, on host-side memory fault

    H. Peter Anvin committed with Willy Tarreau
    commit 5189fa1 upstream.
    There is only one error code to return for a bad user-space buffer
    pointer passed to a system call in the same address space as the
    system call is executed, and that is EFAULT.  Furthermore, the
    low-level access routines, which catch most of the faults, return
    EFAULT already.
    Signed-off-by: H. Peter Anvin <>
    Reviewed-by: Oleg Nesterov <>
    Acked-by: Roland McGrath <>
    Cc: <>
    Signed-off-by: Linus Torvalds <>
    Signed-off-by: Willy Tarreau <>
  5. regset: Prevent null pointer reference on readonly regsets

    H. Peter Anvin committed with Willy Tarreau
    commit c8e2525 upstream.
    The regset common infrastructure assumed that regsets would always
    have .get and .set methods, but not necessarily .active methods.
    Unfortunately people have since written regsets without .set methods.
    Rather than putting in stub functions everywhere, handle regsets with
    null .get or .set methods explicitly.
    Signed-off-by: H. Peter Anvin <>
    Reviewed-by: Oleg Nesterov <>
    Acked-by: Roland McGrath <>
    Cc: <>
    Signed-off-by: Linus Torvalds <>
    Signed-off-by: Willy Tarreau <>
  6. net/usbnet: avoid recursive locking in usbnet_stop()

    Sebastian Siewior committed with Willy Tarreau
    commit 4231d47 upstream.
    |kernel BUG at kernel/rtmutex.c:724!
    |[<c029599c>] (rt_spin_lock_slowlock+0x108/0x2bc) from [<c01c2330>] (defer_bh+0x1c/0xb4)
    |[<c01c2330>] (defer_bh+0x1c/0xb4) from [<c01c3afc>] (rx_complete+0x14c/0x194)
    |[<c01c3afc>] (rx_complete+0x14c/0x194) from [<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0)
    |[<c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0) from [<c01e1ff4>] (musb_giveback+0x34/0x40)
    |[<c01e1ff4>] (musb_giveback+0x34/0x40) from [<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0)
    |[<c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0) from [<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c)
    |[<c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c) from [<c01e2ed0>] (musb_urb_dequeue+0xec/0x108)
    |[<c01e2ed0>] (musb_urb_dequeue+0xec/0x108) from [<c01cbb90>] (unlink1+0xbc/0xcc)
    |[<c01cbb90>] (unlink1+0xbc/0xcc) from [<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8)
    |[<c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8) from [<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58)
    |[<c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58) from [<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c)
    |[<c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c) from [<c01c2d68>] (usbnet_stop+0x100/0x15c)
    |[<c01c2d68>] (usbnet_stop+0x100/0x15c) from [<c020f718>] (__dev_close_many+0x94/0xc8)
    defer_bh() takes the lock which is hold during unlink_urbs(). The safe
    walk suggest that the skb will be removed from the list and this is done
    by defer_bh() so it seems to be okay to drop the lock here.
    Reported-by: Aníbal Almeida Pinto <>
    Signed-off-by: Sebastian Andrzej Siewior <>
    Acked-by: Oliver Neukum <>
    Signed-off-by: David S. Miller <>
    Signed-off-by: Willy Tarreau <>
  7. cifs: fix dentry refcount leak when opening a FIFO on lookup

    Jeff Layton committed with Willy Tarreau
    commit 5bccda0 upstream.
    The cifs code will attempt to open files on lookup under certain
    circumstances. What happens though if we find that the file we opened
    was actually a FIFO or other special file?
    Currently, the open filehandle just ends up being leaked leading to
    a dentry refcount mismatch and oops on umount. Fix this by having the
    code close the filehandle on the server if it turns out not to be a
    regular file. While we're at it, change this spaghetti if statement
    into a switch too.
    Reported-by: CAI Qian <>
    Tested-by: CAI Qian <>
    Reviewed-by: Shirish Pargaonkar <>
    Signed-off-by: Jeff Layton <>
    Signed-off-by: Steve French <>
    Signed-off-by: Willy Tarreau <>
  8. KEYS: Enable the compat keyctl wrapper on s390x

    David Howells committed with Willy Tarreau
    commit 1d05772 upstream.
    Enable the compat keyctl wrapper on s390x so that 32-bit s390 userspace can
    call the keyctl() syscall.
    There's an s390x assembly wrapper that truncates all the register values to
    32-bits and this then calls compat_sys_keyctl() - but the latter only exists if
    CONFIG_KEYS_COMPAT is enabled, and the s390 Kconfig doesn't enable it.
    Without this patch, 32-bit calls to the keyctl() syscall are given an ENOSYS
    	[root@devel4 ~]# keyctl show
    	Session Keyring
    	-3: key inaccessible (Function not implemented)
    Signed-off-by: David Howells <>
    Cc: Carsten Otte <>
    Reviewed-by: Christian Borntraeger <>
    Signed-off-by: Heiko Carstens <>
    Signed-off-by: Martin Schwidefsky <>
    Signed-off-by: Willy Tarreau <>
  9. eCryptfs: Handle failed metadata read in lookup

    Tyler Hicks committed with Willy Tarreau
    When failing to read the lower file's crypto metadata during a lookup,
    eCryptfs must continue on without throwing an error. For example, there
    may be a plaintext file in the lower mount point that the user wants to
    delete through the eCryptfs mount.
    If an error is encountered while reading the metadata in lookup(), the
    eCryptfs inode's size could be incorrect. We must be sure to reread the
    plaintext inode size from the metadata when performing an open() or
    setattr(). The metadata is already being read in those paths, so this
    adds minimal performance overhead.
    This patch introduces a flag which will track whether or not the
    plaintext inode size has been read so that an incorrect i_size can be
    fixed in the open() or setattr() paths.
    Cc: <>
    Signed-off-by: Tyler Hicks <>
    (backported from 3aeb86e)
    Cc: Tyler Hicks <>
    Signed-off-by: Tim Gardner <>
    Signed-off-by: Willy Tarreau <>
  10. @sgruszka

    bsg: fix sysfs link remove warning

    sgruszka committed with Willy Tarreau
    We create "bsg" link if q-> is not NULL, so remove it only
    when the same condition is true.
    WARNING: at fs/sysfs/inode.c:323 sysfs_hash_and_remove+0x2b/0x77()
    sysfs: can not remove 'bsg', no directory
    Call Trace:
      [<c0429683>] warn_slowpath_common+0x6a/0x7f
      [<c0537a68>] ? sysfs_hash_and_remove+0x2b/0x77
      [<c042970b>] warn_slowpath_fmt+0x2b/0x2f
      [<c0537a68>] sysfs_hash_and_remove+0x2b/0x77
      [<c053969a>] sysfs_remove_link+0x20/0x23
      [<c05d88f1>] bsg_unregister_queue+0x40/0x6d
      [<c0692263>] __scsi_remove_device+0x31/0x9d
      [<c069149f>] scsi_forget_host+0x41/0x52
      [<c0689fa9>] scsi_remove_host+0x71/0xe0
      [<f7de5945>] quiesce_and_remove_host+0x51/0x83 [usb_storage]
      [<f7de5a1e>] usb_stor_disconnect+0x18/0x22 [usb_storage]
      [<c06c29de>] usb_unbind_interface+0x4e/0x109
      [<c067a80f>] __device_release_driver+0x6b/0xa6
      [<c067a861>] device_release_driver+0x17/0x22
      [<c067a46a>] bus_remove_device+0xd6/0xe6
      [<c06785e2>] device_del+0xf2/0x137
      [<c06c101f>] usb_disable_device+0x94/0x1a0
    Signed-off-by: Stanislaw Gruszka <>
    Signed-off-by: Jens Axboe <>
    (cherry picked from commit 37b40ad)
    Signed-off-by: Tim Gardner <>
    Signed-off-by: Willy Tarreau <>
  11. writeback: fixups for !dirty_writeback_centisecs

    Jens Axboe committed with Willy Tarreau
    commit 6423104 upstream.
    Commit 69b62d0 fixed up most of the places where we would enter
    busy schedule() spins when disabling the periodic background
    writeback. This fixes up the sb timer so that it doesn't get
    hammered on with the delay disabled, and ensures that it gets
    rearmed if needed when /proc/sys/vm/dirty_writeback_centisecs
    gets modified.
    bdi_forker_task() also needs to check for !dirty_writeback_centisecs
    and use schedule() appropriately, fix that up too.
    Signed-off-by: Jens Axboe <>
    Tested-by: Xavier Roche <>
    Signed-off-by: Jonathan Nieder <>
    Signed-off-by: Willy Tarreau <>
  12. IA64: Remove COMPAT_IA32 support

    Ben Hutchings committed with Willy Tarreau
    commit 32974ad upstream
    This just changes Kconfig rather than touching all the other files the
    original commit did.
    Patch description from the original commit :
      |  [IA64] Remove COMPAT_IA32 support
      |  This has been broken since May 2008 when Al Viro killed altroot support.
      |  Since nobody has complained, it would appear that there are no users of
      |  this code (A plausible theory since the main OSVs that support ia64 prefer
      |  to use the IA32-EL software emulation).
      |  Signed-off-by: Tony Luck <>
    Signed-off-by: Ben Hutchings <>
    Signed-off-by: Willy Tarreau <>
  13. compat: Re-add missing asm/compat.h include to fix compile breakage o…

    Heiko Carstens committed with Willy Tarreau
    …n s390
    For kernels < 3.0 the backport of 048cd4e
    "compat: fix compile breakage on s390" will break compilation...
    Re-add a single #include <asm/compat.h> in order to fix this.
    This patch is _not_ necessary for upstream, only for stable kernels
    which include the "build fix" mentioned above.
    Reported-by: Jiri Slaby <>
    Signed-off-by: Heiko Carstens <>
    Signed-off-by: Willy Tarreau <>
Commits on Mar 4, 2012
  1. @gregkh


    gregkh committed
  2. @gregkh

    PM / Sleep: Fix read_unlock_usermodehelper() call.

    Tetsuo Handa committed with gregkh
    [ Upstream commit e4c89a5 ]
    Commit b298d28
     "PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()"
    added read_unlock_usermodehelper() but read_unlock_usermodehelper() is called
    without read_lock_usermodehelper() when kmalloc() failed.
    Signed-off-by: Tetsuo Handa <>
    Acked-by: Srivatsa S. Bhat <>
    Signed-off-by: Rafael J. Wysocki <>
    Signed-off-by: Srivatsa S. Bhat <>
    Signed-off-by: Greg Kroah-Hartman <>
  3. @gregkh

    PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabl…

    Srivatsa S. Bhat committed with gregkh
    [ Upstream commit b298d28 ]
    Commit a144c6a (PM: Print a warning if firmware is requested when tasks
    are frozen) introduced usermodehelper_is_disabled() to warn and exit
    immediately if firmware is requested when usermodehelpers are disabled.
    However, it is racy. Consider the following scenario, currently used in
    if (usermodehelper_is_disabled())
            goto out;
    /* Do actual work */
            return err;
    Nothing prevents someone from disabling usermodehelpers just after the check
    in the 'if' condition, which means that it is quite possible to try doing the
    "actual work" with usermodehelpers disabled, leading to undesirable
    In particular, this race condition in _request_firmware() causes task freezing
    failures whenever suspend/hibernation is in progress because, it wrongly waits
    to get the firmware/microcode image from userspace when actually the
    usermodehelpers are disabled or userspace has been frozen.
    Some of the example scenarios that cause freezing failures due to this race
    are those that depend on userspace via request_firmware(), such as x86
    microcode module initialization and microcode image reload.
    Previous discussions about this issue can be found at:
    This patch adds proper synchronization to fix this issue.
    It is to be noted that this patchset fixes the freezing failures but doesn't
    remove the warnings. IOW, it does not attempt to add explicit synchronization
    to x86 microcode driver to avoid requesting microcode image at inopportune
    moments. Because, the warnings were introduced to highlight such cases, in the
    first place. And we need not silence the warnings, since we take care of the
    *real* problem (freezing failure) and hence, after that, the warnings are
    pretty harmless anyway.
    Signed-off-by: Srivatsa S. Bhat <>
    Signed-off-by: Rafael J. Wysocki <>
    Signed-off-by: Greg Kroah-Hartman <>
  4. @torvalds @gregkh

    firmware loader: allow builtin firmware load even if usermodehelper i…

    torvalds committed with gregkh
    …s disabled
    [ Upstream commit caca951 ]
    In commit a144c6a ("PM: Print a warning if firmware is requested
    when tasks are frozen") we not only printed a warning if somebody tried
    to load the firmware when tasks are frozen - we also failed the load.
    But that check was done before the check for built-in firmware, and then
    when we disallowed usermode helpers during bootup (commit 288d5ab:
    "Boot up with usermodehelper disabled"), that actually means that
    built-in modules can no longer load their firmware even if the firmware
    is built in too.  Which used to work, and some people depended on it for
    the R100 driver.
    So move the test for usermodehelper_is_disabled() down, to after
    checking the built-in firmware.
    This should fix:

    Reported-by: James Cloos <>
    Bisected-by: Elimar Riesebieter <>
    Cc: Michel Dänzer <>
    Cc: Rafael Wysocki <>
    Cc: Valdis Kletnieks <>
    Signed-off-by: Linus Torvalds <>
    Signed-off-by: Srivatsa S. Bhat <>
    Signed-off-by: Greg Kroah-Hartman <>
  5. @rjwysocki @gregkh

    PM: Print a warning if firmware is requested when tasks are frozen

    rjwysocki committed with gregkh
    [ Upstream commit a144c6a ]
    Some drivers erroneously use request_firmware() from their ->resume()
    (or ->thaw(), or ->restore()) callbacks, which is not going to work
    unless the firmware has been built in.  This causes system resume to
    stall until the firmware-loading timeout expires, which makes users
    think that the resume has failed and reboot their machines
    unnecessarily.  For this reason, make _request_firmware() print a
    warning and return immediately with error code if it has been called
    when tasks are frozen and it's impossible to start any new usermode
    Signed-off-by: Rafael J. Wysocki <>
    Acked-by: Greg Kroah-Hartman <>
    Reviewed-by: Valdis Kletnieks <>
    Signed-off-by: Srivatsa S. Bhat <>
    Signed-off-by: Greg Kroah-Hartman <>
  6. @gregkh

    compat: fix compile breakage on s390

    Heiko Carstens committed with gregkh
    commit 048cd4e upstream.
    The new is_compat_task() define for the !COMPAT case in
    include/linux/compat.h conflicts with a similar define in
    This is the minimal patch which fixes the build issues.
    Signed-off-by: Heiko Carstens <>
    Signed-off-by: Linus Torvalds <>
    Cc: Jonathan Nieder <>
    Signed-off-by: Greg Kroah-Hartman <>
  7. @torvalds @gregkh

    Fix autofs compile without CONFIG_COMPAT

    torvalds committed with gregkh
    commit 3c761ea upstream.
    The autofs compat handling fix caused a compile failure when
    CONFIG_COMPAT isn't defined.
    Instead of adding random #ifdef'fery in autofs, let's just make the
    compat helpers earlier to use: without CONFIG_COMPAT, is_compat_task()
    just hardcodes to zero.
    We could probably do something similar for a number of other cases where
    we have #ifdef's in code, but this is the low-hanging fruit.
    Reported-and-tested-by: Andreas Schwab <>
    Signed-off-by: Linus Torvalds <>
    Cc: Jonathan Nieder <>
    Signed-off-by: Greg Kroah-Hartman <>
  8. @raven-au @gregkh

    autofs: work around unhappy compat problem on x86-64

    raven-au committed with gregkh
    commit a32744d upstream.
    When the autofs protocol version 5 packet type was added in commit
    5c0a32f ("autofs4: add new packet type for v5 communications"), it
    obvously tried quite hard to be word-size agnostic, and uses explicitly
    sized fields that are all correctly aligned.
    However, with the final "char name[NAME_MAX+1]" array at the end, the
    actual size of the structure ends up being not very well defined:
    because the struct isn't marked 'packed', doing a "sizeof()" on it will
    align the size of the struct up to the biggest alignment of the members
    it has.
    And despite all the members being the same, the alignment of them is
    different: a "__u64" has 4-byte alignment on x86-32, but native 8-byte
    alignment on x86-64.  And while 'NAME_MAX+1' ends up being a nice round
    number (256), the name[] array starts out a 4-byte aligned.
    End result: the "packed" size of the structure is 300 bytes: 4-byte, but
    not 8-byte aligned.
    As a result, despite all the fields being in the same place on all
    architectures, sizeof() will round up that size to 304 bytes on
    architectures that have 8-byte alignment for u64.
    Note that this is *not* a problem for 32-bit compat mode on POWER, since
    there __u64 is 8-byte aligned even in 32-bit mode.  But on x86, 32-bit
    and 64-bit alignment is different for 64-bit entities, and as a result
    the structure that has exactly the same layout has different sizes.
    So on x86-64, but no other architecture, we will just subtract 4 from
    the size of the structure when running in a compat task.  That way we
    will write the properly sized packet that user mode expects.
    Not pretty.  Sadly, this very subtle, and unnecessary, size difference
    has been encoded in user space that wants to read packets of *exactly*
    the right size, and will refuse to touch anything else.
    Reported-and-tested-by: Thomas Meyer <>
    Signed-off-by: Ian Kent <>
    Signed-off-by: Linus Torvalds <>
    Cc: Jonathan Nieder <>
    Signed-off-by: Greg Kroah-Hartman <>
  9. @gregkh

    cdrom: use copy_to_user() without the underscores

    Dan Carpenter committed with gregkh
    commit 822bfa5 upstream.
    "nframes" comes from the user and "nframes * CD_FRAMESIZE_RAW" can wrap
    on 32 bit systems.  That would have been ok if we used the same wrapped
    value for the copy, but we use a shifted value.  We should just use the
    checked version of copy_to_user() because it's not going to make a
    difference to the speed.
    Signed-off-by: Dan Carpenter <>
    Signed-off-by: Jens Axboe <>
    Signed-off-by: Greg Kroah-Hartman <>
  10. @gregkh

    eCryptfs: Clear i_nlink in rmdir

    Tyler Hicks committed with gregkh
    commit 0785055 upstream.
    eCryptfs wasn't clearing the eCryptfs inode's i_nlink after a successful
    vfs_rmdir() on the lower directory. This resulted in the inode evict and
    destroy paths to be missed.
    Signed-off-by: Tyler Hicks <>
    Signed-off-by: Colin King <>
    Signed-off-by: Tim Gardner <>
    Signed-off-by: Greg Kroah-Hartman <>
  11. @gregkh

    eCryptfs: Remove extra d_delete in ecryptfs_rmdir

    Tyler Hicks committed with gregkh
    commit 35ffa94 upstream.
    vfs_rmdir() already calls d_delete() on the lower dentry. That was being
    duplicated in ecryptfs_rmdir() and caused a NULL pointer dereference
    when NFSv3 was the lower filesystem.
    Signed-off-by: Tyler Hicks <>
    Signed-off-by: Colin King <>
    Signed-off-by: Tim Gardner <>
    Signed-off-by: Greg Kroah-Hartman <>
  12. @gregkh

    eCryptfs: Use notify_change for truncating lower inodes

    Tyler Hicks committed with gregkh
    commit 5f3ef64 upstream.
    When truncating inodes in the lower filesystem, eCryptfs directly
    invoked vmtruncate(). As Christoph Hellwig pointed out, vmtruncate() is
    a filesystem helper function, but filesystems may need to do more than
    just a call to vmtruncate().
    This patch moves the lower inode truncation out of ecryptfs_truncate()
    and renames the function to truncate_upper().  truncate_upper() updates
    an iattr for the lower inode to indicate if the lower inode needs to be
    truncated upon return.  ecryptfs_setattr() then calls notify_change(),
    using the updated iattr for the lower inode, to complete the truncation.
    For eCryptfs functions needing to truncate, ecryptfs_truncate() is
    reintroduced as a simple way to truncate the upper inode to a specified
    size and then truncate the lower inode accordingly.
    Reported-by: Christoph Hellwig <>
    Acked-by: Dustin Kirkland <>
    Signed-off-by: Tyler Hicks <>
    Signed-off-by: Colin Ian King <>
    Signed-off-by: Tim Gardner <>
    Signed-off-by: Greg Kroah-Hartman <>
  13. @jannau @gregkh

    hdpvr: fix race conditon during start of streaming

    jannau committed with gregkh
    commit afa1595 upstream.
    status has to be set to STREAMING before the streaming worker is
    queued. hdpvr_transmit_buffers() will exit immediately otherwise.
    Reported-by: Joerg Desch <>
    Signed-off-by: Mauro Carvalho Chehab <>
    Signed-off-by: Greg Kroah-Hartman <>
  14. @gregkh

    xhci: Fix encoding for HS bulk/control NAK rate.

    Sarah Sharp committed with gregkh
    commit 340a350 upstream.
    The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must
    be encoded as an exponent of two number of microframes.  The endpoint
    descriptor has the NAK rate encoded in number of microframes.  We were
    just copying the value from the endpoint descriptor into the endpoint
    context interval field, which was not correct.  This lead to the VIA
    host rejecting the add of a bulk OUT endpoint from any USB 2.0 mass
    storage device.
    The fix is to use the correct encoding.  Refactor the code to convert
    number of frames to an exponential number of microframes, and make sure
    we convert the number of microframes in HS bulk and control endpoints to
    an exponent.
    This should be back ported to kernels as old as 2.6.31, that contain the
    commit dfa49c4 "USB: xhci - fix math
    in xhci_get_endpoint_interval"
    Signed-off-by: Sarah Sharp <>
    Tested-by: Felipe Contreras <>
    Suggested-by: Andiry Xu <>
    Signed-off-by: Greg Kroah-Hartman <>
  15. @gregkh

    USB: Fix handoff when BIOS disables host PCI device.

    Sarah Sharp committed with gregkh
    commit cab928e upstream.
    On some systems with an Intel Panther Point xHCI host controller, the
    BIOS disables the xHCI PCI device during boot, and switches the xHCI
    ports over to EHCI.  This allows the BIOS to access USB devices without
    having xHCI support.
    The downside is that the xHCI BIOS handoff mechanism will fail because
    memory mapped I/O is not enabled for the disabled PCI device.
    Jesse Barnes says this is expected behavior.  The PCI core will enable
    BARs before quirks run, but it will leave it in an undefined state, and
    it may not have memory mapped I/O enabled.
    Make the generic USB quirk handler call pci_enable_device() to re-enable
    MMIO, and call pci_disable_device() once the host-specific BIOS handoff
    is finished.  This will balance the ref counts in the PCI core.  When
    the PCI probe function is called, usb_hcd_pci_probe() will call
    pci_enable_device() again.
    This should be back ported to kernels as old as 2.6.31.  That was the
    first kernel with xHCI support, and no one has complained about BIOS
    handoffs failing due to memory mapped I/O being disabled on other hosts
    (EHCI, UHCI, or OHCI).
    Signed-off-by: Sarah Sharp <>
    Acked-by: Oliver Neukum <>
    Cc: Jesse Barnes <>
    Signed-off-by: Greg Kroah-Hartman <>
  16. @baxeno @gregkh

    USB: Added Kamstrup VID/PIDs to cp210x serial driver.

    baxeno committed with gregkh
    commit c6c1e44 upstream.
    Signed-off-by: Bruno Thomsen <>
    Signed-off-by: Greg Kroah-Hartman <>
  17. @rabinv @gregkh

    ARM: 7325/1: fix v7 boot with lockdep enabled

    rabinv committed with gregkh
    commit 8e43a90 upstream.
    Bootup with lockdep enabled has been broken on v7 since b46c0f7
    ("ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR").
    This is because v7_setup (which is called very early during boot) calls
    v7_flush_dcache_all, and the save_and_disable_irqs added by that patch
    ends up attempting to call into lockdep C code (trace_hardirqs_off())
    when we are in no position to execute it (no stack, MMU off).
    Fix this by using a notrace variant of save_and_disable_irqs.  The code
    already uses the notrace variant of restore_irqs.
    Reviewed-by: Nicolas Pitre <>
    Acked-by: Stephen Boyd <>
    Cc: Catalin Marinas <>
    Signed-off-by: Rabin Vincent <>
    Signed-off-by: Russell King <>
    Signed-off-by: Greg Kroah-Hartman <>
  18. @bebarino @gregkh

    ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR

    bebarino committed with gregkh
    commit b46c0f7 upstream.
    armv7's flush_cache_all() flushes caches via set/way. To
    determine the cache attributes (line size, number of sets,
    etc.) the assembly first writes the CSSELR register to select a
    cache level and then reads the CCSIDR register. The CSSELR register
    is banked per-cpu and is used to determine which cache level CCSIDR
    reads. If the task is migrated between when the CSSELR is written and
    the CCSIDR is read the CCSIDR value may be for an unexpected cache
    level (for example L1 instead of L2) and incorrect cache flushing
    could occur.
    Disable interrupts across the write and read so that the correct
    cache attributes are read and used for the cache flushing
    routine. We disable interrupts instead of disabling preemption
    because the critical section is only 3 instructions and we want
    to call v7_dcache_flush_all from __v7_setup which doesn't have a
    full kernel stack with a struct thread_info.
    This fixes a problem we see in scm_call() when flush_cache_all()
    is called from preemptible context and sometimes the L2 cache is
    not properly flushed out.
    Signed-off-by: Stephen Boyd <>
    Acked-by: Catalin Marinas <>
    Reviewed-by: Nicolas Pitre <>
    Signed-off-by: Russell King <>
    Signed-off-by: Greg Kroah-Hartman <>
  19. @gregkh

    SCSI: 3w-9xxx fix bug in sgl loading

    adam radford committed with gregkh
    commit 53ca353 upstream.
    This small patch fixes a bug in the 3w-9xxx driver where it would load
    an invalid sgl address in the ioctl path even if request length was zero.
    Signed-off-by: Adam Radford <>
    Signed-off-by: James Bottomley <>
    Cc: Ben Hutchings <>
    Signed-off-by: Greg Kroah-Hartman <>
  20. @gregkh

    ecryptfs: read on a directory should return EISDIR if not supported

    Andy Whitcroft committed with gregkh
    commit 323ef68 upstream.
    read() calls against a file descriptor connected to a directory are
    incorrectly returning EINVAL rather than EISDIR:
        [XSI] [Option Start] The fildes argument refers to a directory and the
        implementation does not allow the directory to be read using read()
        or pread(). The readdir() function should be used instead. [Option End]
    This occurs because we do not have a .read operation defined for
    ecryptfs directories.  Connect this up to generic_read_dir().
    Signed-off-by: Andy Whitcroft <>
    Signed-off-by: Tyler Hicks <>
  21. @gregkh

    drm/radeon/kms: fix MSI re-arm on rv370+

    Alex Deucher committed with gregkh
    commit b7f5b7d upstream.
    MSI_REARM_EN register is a write only trigger register.
    There is no need RMW when re-arming.
    May fix:
    Signed-off-by: Alex Deucher <>
    Signed-off-by: Dave Airlie <>
    Signed-off-by: Greg Kroah-Hartman <>
  22. @gregkh

    crypto: sha512 - use standard ror64()

    Alexey Dobriyan committed with gregkh
    commit f2ea0f5 upstream.
    Use standard ror64() instead of hand-written.
    There is no standard ror64, so create it.
    The difference is shift value being "unsigned int" instead of uint64_t
    (for which there is no reason). gcc starts to emit native ROR instructions
    which it doesn't do for some reason currently. This should make the code
    Patch survives in-tree crypto test and ping flood with hmac(sha512) on.
    Signed-off-by: Alexey Dobriyan <>
    Signed-off-by: Herbert Xu <>
    Signed-off-by: Greg Kroah-Hartman <>
Something went wrong with that request. Please try again.