Skip to content
  1. Nov 30, 2013
    • Linus Torvalds's avatar
      Merge branch 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · de92a058
      Linus Torvalds authored
      Pull libata fixes from Tejun Heo:
       "libata device removal path was removing parent device node before its
        child, which is mostly harmless but triggers warning after recent
        sysfs changes.  Rafael's patch fixes the order.
      
        Other than that, minor controller-specific fixes and device ID
        additions"
      
      * 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ATA: Fix port removal ordering
        ahci: add Marvell 9230 to the AHCI PCI device list
        ata: fix acpi_bus_get_device() return value check
        pata_arasan_cf: add missing clk_disable_unprepare() on error path
        ahci: add support for IBM Akebono platform device
      de92a058
    • Linus Torvalds's avatar
      Merge branch 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 2855987d
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "Fixes for three issues.
      
         - cgroup destruction path could swamp system_wq possibly leading to
           deadlock.  This actually seems to happen in the wild with memcg
           because memcg destruction path adds nested dependency on system_wq.
      
           Resolved by isolating cgroup destruction work items on its
           dedicated workqueue.
      
         - Possible locking context deadlock through seqcount reported by
           lockdep
      
         - Memory leak under certain conditions"
      
      * 'for-3.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: fix cgroup_subsys_state leak for seq_files
        cpuset: Fix memory allocator deadlock
        cgroup: use a dedicated workqueue for cgroup destruction
      2855987d
    • Linus Torvalds's avatar
      Merge tag 'sound-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b8495995
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Quite a few HD-Audio fixes, a WUSB audio fix and a fix for FireWire
        audio.  The HD-audio part contains a couple of fixes for the generic
        parser, and these are the only intrusive fixes.  The rest are mostly
        device-specific fixes"
      
      * tag 'sound-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Add LFE chmap to ASUS ET2700
        ALSA: hda - Initialize missing bass speaker pin for ASUS AIO ET2700
        ALSA: hda - limit mic boost on Asus UX31[A,E]
        ALSA: hda - Check leaf nodes to find aamix amps
        ALSA: hda - Fix hp-mic mode without VREF bits
        ALSA: hda - Create Headhpone Mic Jack Mode when really needed
        ALSA: usb: use multiple packets per urb for Wireless USB inbound audio
        ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Conexant codec
        ALSA: hda - Drop bus->avoid_link_reset flag
        ALSA: hda/realtek - Set pcbeep amp for ALC668
        ALSA: hda/realtek - Add support of ALC231 codec
        ALSA: firewire-lib: fix wrong value for FDF field as an empty packet
      b8495995
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · b01537bf
      Linus Torvalds authored
      Pull vfs dentry reference count fix from Al Viro.
      
      This fixes a possible inode_permission NULL pointer dereference (and
      other problems) that were due to the root dentry count being decremented
      too much.  In commit 48a066e7 ("RCU'd vfsmounts") the placement of
      clearing the LOOKUP_RCU bit changed, and we then returned failure of
      incrementing the lockref on the parent dentry with LOOKUP_RCU cleared.
      
      But that meant we needed to go through the same cleanup routines that
      the later failures did wrt LOOKUP_ROOT and nd->root.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix bogus path_put() of nd->root after some unlazy_walk() failures
      b01537bf
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 282c183b
      Linus Torvalds authored
      Pull drm qxl leak fix from Dave Airlie:
       "As usual 5 mins after I send a trivial pull fix I find a real bug!
      
        This fixes a memory leak and I'd like to get it into stable queue
        asap"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/qxl: fix memory leak in release list handling
      282c183b
  2. Nov 29, 2013
    • Al Viro's avatar
      fix bogus path_put() of nd->root after some unlazy_walk() failures · d870b4a1
      Al Viro authored
      
      
      Failure to grab reference to parent dentry should go through the
      same cleanup as nd->seq mismatch.  As it is, we might end up with
      caller thinking it needs to path_put() nd->root, with obvious
      nasty results once we'd hit that bug enough times to drive the
      refcount of root dentry all the way to zero...
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d870b4a1
    • Dave Airlie's avatar
      drm/qxl: fix memory leak in release list handling · 1b28c3e6
      Dave Airlie authored
      wow no idea how I got this far without seeing this,
      leaking the entries in the list makes kmalloc-64 slab grow.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=65121
      
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarMatthew Stapleton <matthew4196@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1b28c3e6
    • Linus Torvalds's avatar
      Merge tag 'gpio-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · dda9cc3a
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Here us a bunch of patches for the v3.13 series.  Most important stuff
        is related to fixes and documentation for the new GPIO descriptor API.
        If the diffstat is scary you'll notice most of it is to
        Documentation/*:
      
         - A big slew of documentation for the gpiod transition that happened
           in the merge window, no semantic effect, but we should provide
           proper documentation with the new API.
      
         - Fix flags related to the new API.
      
         - Fix to the find_chip_by_name() lookup function related to the new
           API.
      
         - Fix of_find_gpio() when not using device tree.
      
         - Bug fix for the TB10x direction setting.
      
         - Error path fixes from Dan Carpenter.
      
         - Nasty IRQdomain bug relating to taking an unitialized spinlock.
      
         - Minor fixes here and there"
      
      * tag 'gpio-v3.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()
        gpio: pl061: move irqdomain initialization
        gpio: ucb1400: Add MODULE_ALIAS
        gpiolib: fix of_find_gpio() when OF not defined
        gpio: fix memory leak in error path
        gpio: rcar: NULL dereference on error in probe()
        gpio: msm: make msm_gpio.summary_irq signed for error handling
        gpio: mvebu: make mvchip->irqbase signed for error handling
        gpiolib: use dedicated flags for GPIO properties
        gpiolib: fix find_chip_by_name()
        Documentation: gpiolib: document new interface
        gpio: tb10x: Set output value before setting direction to output
      dda9cc3a
    • Linus Torvalds's avatar
      Merge tag 'md/3.13-fixes' of git://neil.brown.name/md · 962ba263
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Three bug fixes for md in 3.13-rc
      
        All recent regressions, one in 3.12 so marked for -stable"
      
      * tag 'md/3.13-fixes' of git://neil.brown.name/md:
        md/raid5: fix newly-broken locking in get_active_stripe.
        md: test mddev->flags more safely in md_check_recovery.
        md/raid5: fix new memory-reference bug in alloc_thread_groups.
      962ba263
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 3bad8bb5
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "SMB3 "validate negotiate" is needed to prevent certain types of
        downgrade attacks.
      
        Also changes SMB2/SMB3 copy offload from using the BTRFS copy ioctl
        (BTRFS_IOC_CLONE) to a cifs specific ioctl (CIFS_IOC_COPYCHUNK_FILE)
        to address Christoph's comment that there are semantic differences
        between requesting copy offload in which copy-on-write is mandatory
        (as in the BTRFS ioctl) and optional in the SMB2/SMB3 case.  Also
        fixes SMB2/SMB3 copychunk for large files"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        [CIFS] Do not use btrfs refcopy ioctl for SMB2 copy offload
        Check SMB3 dialects against downgrade attacks
        Removed duplicated (and unneeded) goto
        CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files
      3bad8bb5
    • Helge Deller's avatar
      kernel/extable: fix address-checks for core_kernel and init areas · 5ecbe3c3
      Helge Deller authored
      
      
      The init_kernel_text() and core_kernel_text() functions should not
      include the labels _einittext and _etext when checking if an address is
      inside the .text or .init sections.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5ecbe3c3
  3. Nov 28, 2013
    • Takashi Iwai's avatar
      ALSA: hda - Add LFE chmap to ASUS ET2700 · eb9ca3ab
      Takashi Iwai authored
      As the previous commit 1f0bbf03 added the pin config for the bass
      speaker, this patch adds the corresponding LFE-only channel map on
      ASUS ET2700.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65961
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      eb9ca3ab
    • Takashi Iwai's avatar
      ALSA: hda - Initialize missing bass speaker pin for ASUS AIO ET2700 · 1f0bbf03
      Takashi Iwai authored
      Add a fixup entry for the missing bass speaker pin 0x16 on ASUS ET2700
      AiO desktop.  The channel map will be added in the next patch, so that
      this can be backported easily to stable kernels.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65961
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1f0bbf03
    • Oleksij Rempel's avatar
      ALSA: hda - limit mic boost on Asus UX31[A,E] · 2cede303
      Oleksij Rempel authored
      
      
      This both devices need limit for internal dmic.
      
      [cosmetic change; renamed fixup name by tiwai]
      
      Signed-off-by: default avatarOleksij Rempel <linux@rempel-privat.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2cede303
    • Takashi Iwai's avatar
      ALSA: hda - Check leaf nodes to find aamix amps · 2ded3e5b
      Takashi Iwai authored
      The current generic parser assumes blindly that the volume and mute
      amps are found in the aamix node itself.  But on some codecs,
      typically Analog Devices ones, the aamix amps are separately
      implemented in each leaf node of the aamix node, and the current
      driver can't establish the correct amp controls.  This is a regression
      compared with the previous static quirks.
      
      This patch extends the search for the amps to the leaf nodes for
      allowing the aamix controls again on such codecs.
      In this implementation, I didn't code to loop through the whole paths,
      since usually one depth should suffice, and we can't search too
      deeply, as it may result in the conflicting control assignments.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65641
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2ded3e5b
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · e7c0d3da
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Just two minor fixes as people keep resending since they are so low
        hanging"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau/hwmon: fix compilation without CONFIG_HWMON
        drm/sysfs: fix OOM verification
      e7c0d3da
    • Linus Torvalds's avatar
      Merge tag 'tty-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 682a2512
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are some tty/serial driver fixes for reported issues in 3.13-rc2.
      
        The n_gsm "fix" was reverted as it was found to not be correct.
        Hopefully this will be resolved in a future pull request, but as
        there's really only one user of this line setting, it's not a big
        deal..."
      
      * tag 'tty-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        Revert "n_gsm: race between ld close and gsmtty open"
        n_tty: Protect minimum_to_wake reset for concurrent readers
        tty: Reset hupped state on open
        TTY: amiserial, add missing platform check
        TTY: pmac_zilog, check existence of ports in pmz_console_init()
        n_gsm: race between ld close and gsmtty open
        tty/serial/8250: fix typo in help text
        n_tty: Fix 4096-byte canonical reads
        n_tty: Fix echo overrun tail computation
        n_tty: Ensure reader restarts worker for next reader
      682a2512
    • Linus Torvalds's avatar
      Merge tag 'staging-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 0b0f7f1c
      Linus Torvalds authored
      Pull staging fixes from Greg KH:
       "Here are a number of staging, and IIO driver, fixes for 3.13-rc2 that
        resolve issues that have been reported for 3.13-rc1.  All of these
        have been in linux-next for a bit this week"
      
      * tag 'staging-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (25 commits)
        Staging: tidspbridge: disable driver
        staging: zsmalloc: Ensure handle is never 0 on success
        staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logic
        staging: r8188eu: Fix AP mode
        Staging: btmtk_usb: Add hdev parameter to hdev->send driver callback
        Staging: go7007: fix up some remaining go->dev issues
        staging: imx-drm: Fix modular build of DRM_IMX_IPUV3
        staging: ft1000: fix use of potentially uninitialized variable
        Revert "staging:media: Use dev_dbg() instead of pr_debug()"
        Staging: zram: Fix memory leak by refcount mismatch
        staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
        staging: nvec: potential NULL dereference on error path
        Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd()
        staging: comedi: s626: fix value written by s626_set_dac()
        Staging: comedi: pcl730: fix some bitwise vs logical AND bugs
        staging: comedi: fix potentially uninitialised variable
        iio:accel:kxsd9 fix missing mutex unlock
        iio: adc: ti_am335x_adc: avoid double free of buffer.
        staging:iio: Fix hmc5843 Kconfig dependencies
        iio: Fix tcs3472 Kconfig dependencies
        ...
      0b0f7f1c
    • Linus Torvalds's avatar
      Merge tag 'driver-core-3.13-rc2' of... · f4968636
      Linus Torvalds authored
      Merge tag 'driver-core-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      
      
      Pull driver core fixes from Greg KH:
       "Here are 3 patches for sysfs issues that have been reported.  Well, 1
        patch really, the first one is reverted as it's not really needed (the
        correct fix is coming in through the different driver subsystems
        instead)
      
        But that 1 sysfs fix is needed, so this is still a good thing to pull
        in now"
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'driver-core-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Revert "sysfs: handle duplicate removal attempts in sysfs_remove_group()"
        sysfs: use a separate locking class for open files depending on mmap
        sysfs: handle duplicate removal attempts in sysfs_remove_group()
      f4968636
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · ba33fef0
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
       - fix compat ioctl leak in uhid, by David Herrmann
       - fix scheduling in atomic context (causing actual lockups in real
         world) in hid-sony driver, by Sven Eckelmann
       - revert patch introducing VID/PID conflict, by Jiri Kosina
       - support from various new device IDs by Benjamin Tissoires and
         KaiChung Cheng
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: uhid: fix leak for 64/32 UHID_CREATE
        HID: kye: fix unresponsive keyboard
        HID: kye: Add report fixup for Genius Manticore Keyboard
        HID: multicouh: add PID VID to support 1 new Wistron optical touch device
        HID: appleir: force input to be set
        Revert "HID: wiimote: add LEGO-wiimote VID"
        HID: sony: Send FF commands in non-atomic context
      ba33fef0
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b7fe6bf7
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
      
       - Fix for a recent regression in the Tegra cpufreq driver causing
         excess error messages to be printed from Stephen Warren
      
       - ACPI-based device hotplug fix to prevent conflicting notify handlers
         from being installed for PCI host bridge objects.  From Toshi Kani
      
       - ACPICA update to upstream version 20131115.  This contains bug fixes
         mostly (loop termination fix for the get AML length function, fixes
         related to namespace node removal and debug output).  From Bob Moore,
         Tomasz Nowicki and Lv Zheng
      
       - Removal of incorrect inclusions of internal ACPICA header files by
         non-ACPICA code from Lv Zheng
      
       - Fixes for the ACPI sysfs interface exposing tables to user space from
         Daisuke Hatayama and Jeremy Compostella
      
       - Assorted ACPI and cpufreq cleanups from Sachin Kamat and Al Stone
      
       - cpupower tool fix and man page from Thomas Renninger
      
      * tag 'pm+acpi-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: Clean up incorrect inclusions of ACPICA headers
        tools: cpupower: fix wrong err msg not supported vs not available
        tools: cpupower: Add cpupower-idle-set(1) manpage
        ACPI / sysfs: Fix incorrect ACPI tables walk in acpi_tables_sysfs_init()
        ACPI / sysfs: Set file size for each exposed ACPI table
        ACPICA: Update version to 20131115.
        ACPICA: Add support to delete all objects attached to the root namespace node.
        ACPICA: Delete all attached data objects during namespace node deletion.
        ACPICA: Resources: Fix loop termination for the get AML length function.
        ACPICA: Tests: Add CHECKSUM_ABORT protection for test utilities.
        ACPICA: Debug output: Do not emit function nesting level for kernel build.
        ACPI / sleep: clean up compiler warning about uninitialized field
        cpufreq: exynos: Remove unwanted EXPORT_SYMBOL
        cpufreq: tegra: don't error target() when suspended
        ACPI / hotplug: Fix conflicted PCI bridge notify handlers
      b7fe6bf7
    • Nicolas Dichtel's avatar
      doc: fix generation of device-drivers · 96d5d9d9
      Nicolas Dichtel authored
      Since commit 7a6354e2
      
       ("sched: Move wait.c into kernel/sched/"), the
      path of this file has changed.
      
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarAndy Whitcroft <apw@canonical.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      96d5d9d9
    • Ilia Mirkin's avatar
    • Will Deacon's avatar
      lockref: include mutex.h rather than reinvent arch_mutex_cpu_relax · 14058d20
      Will Deacon authored
      
      
      arch_mutex_cpu_relax is already conditionally defined in mutex.h, so
      simply include that header rather than replicate the code here.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      14058d20
    • David Herrmann's avatar
      drm/sysfs: fix OOM verification · a1f84f57
      David Herrmann authored
      
      
      Copy/Paste typo.. we need to test for ->kdev instead of ->dev.
      
      Reported-by: default avatarJuha Leppänen <juha_efku@dnainternet.net>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a1f84f57
    • Dave Jones's avatar
      remove obsolete references to powertweak · dad33750
      Dave Jones authored
      
      
      This tool hasn't been maintained in over a decade, and is pretty much
      useless these days.  Let's pretend it never happened.
      
      Also remove a long-dead email address.
      
      Signed-off-by: default avatarDave Jones <davej@fedoraproject.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dad33750
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · a456c0d9
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "The main thing that caused problem was that CONFIG_CPU_LITTLE_ENDIAN
        got turned on with allyesconfig and such, which is not a very good
        idea especially since it requires a newer toolchain than what most
        people have.
      
        So we turned it into a choice instead that defaults to big endian"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/windfarm: Fix XServe G5 fan control Makefile issue
        arch/powerpc/kernel: Use %12.12s instead of %12s to avoid memory overflow
        powerpc/signals: Improved mark VSX not saved with small contexts fix
        powerpc/kdump: Adding symbols in vmcoreinfo to facilitate dump filtering
        powerpc: allyesconfig should not select CONFIG_CPU_LITTLE_ENDIAN
        powerpc: Fix error when cross building TAGS & cscope
        powerpc/booke: Only check for hugetlb in flush if vma != NULL
        powerpc/85xx: typo in dts: "interupt" (four devices)
        powerpc/8xx: mfspr SPRN_TBRx in lieu of mftb/mftbu is not supported
        powerpc/corenet64: compile with CONFIG_E{5,6}500_CPU well
      a456c0d9
    • NeilBrown's avatar
      md/raid5: fix newly-broken locking in get_active_stripe. · 6d183de4
      NeilBrown authored
      commit 566c09c5
      
       raid5: relieve lock contention in get_active_stripe()
      
      modified the locking in get_active_stripe() reducing the range
      protected by the (highly contended) device_lock.
      Unfortunately it reduced the range too much opening up some races.
      
      One race can occur if get_priority_stripe runs between the
      test on sh->count and device_lock being taken.
      This will mean that sh->lru is not empty while get_active_stripe
      thinks ->count is zero resulting in a 'BUG' firing.
      
      Another race happens if __release_stripe is called immediately
      after sh->count is tested and found to be non-zero.  If STRIPE_HANDLE
      is not set, get_active_stripe should increment ->active_stripes
      when it increments ->count from 0, but as it didn't think it was 0,
      it doesn't.
      
      Extending device_lock to cover the test on sh->count close these
      races.
      
      While we are here, fix the two BUG tests:
       -If count is zero, then lru really must not be empty, or we've
        lock the stripe_head somehow - no other tests are relevant.
       -STRIPE_ON_RELEASE_LIST is completely independent of ->lru so
        testing it is pointless.
      
      Reported-and-tested-by: default avatarBrassow Jonathan <jbrassow@redhat.com>
      Reviewed-by: default avatarShaohua Li <shli@kernel.org>
      Fixes: 566c09c5
      
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      6d183de4
    • NeilBrown's avatar
      md: test mddev->flags more safely in md_check_recovery. · 142d44c3
      NeilBrown authored
      commit 7a0a5355 md: Don't test all of mddev->flags at once.
      made most tests on mddev->flags safer, but missed one.
      
      When
      commit 260fa034 md: avoid deadlock when dirty buffers during md_stop.
      added MD_STILL_CLOSED, this caused md_check_recovery to misbehave.
      It can think there is something to do but find nothing.  This can
      lead to the md thread spinning during array shutdown.
      
      https://bugzilla.kernel.org/show_bug.cgi?id=65721
      
      
      
      Reported-and-tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
      Fixes: 260fa034
      
      
      Cc: stable@vger.kernel.org (3.12)
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      142d44c3
    • NeilBrown's avatar
      md/raid5: fix new memory-reference bug in alloc_thread_groups. · 0c775d52
      NeilBrown authored
      In alloc_thread_groups, worker_groups is a pointer to an array,
      not an array of pointers.
      So
         worker_groups[i]
      is wrong.  It should be
         &(*worker_groups)[i]
      
      Found-by: coverity
      Fixes: 60aaf933
      
      
      Reported-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      Cc: majianpeng <majianpeng@gmail.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      0c775d52
    • Tejun Heo's avatar
      cgroup: fix cgroup_subsys_state leak for seq_files · e605b365
      Tejun Heo authored
      If a cgroup file implements either read_map() or read_seq_string(),
      such file is served using seq_file by overriding file->f_op to
      cgroup_seqfile_operations, which also overrides the release method to
      single_release() from cgroup_file_release().
      
      Because cgroup_file_open() didn't use to acquire any resources, this
      used to be fine, but since f7d58818
      
       ("cgroup: pin
      cgroup_subsys_state when opening a cgroupfs file"), cgroup_file_open()
      pins the css (cgroup_subsys_state) which is put by
      cgroup_file_release().  The patch forgot to update the release path
      for seq_files and each open/release cycle leaks a css reference.
      
      Fix it by updating cgroup_file_release() to also handle seq_files and
      using it for seq_file release path too.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org # v3.12
      e605b365
    • Rafael J. Wysocki's avatar
      ATA: Fix port removal ordering · c5700766
      Rafael J. Wysocki authored
      After commit bcdde7e2 (sysfs: make __sysfs_remove_dir() recursive)
      Mika Westerberg sees traces analogous to the one below in Thunderbolt
      hot-remove testing:
      
       WARNING: CPU: 0 PID: 4 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0()
       sysfs group ffffffff81c6f1e0 not found for kobject 'host7'
       Modules linked in:
       CPU: 0 PID: 4 Comm: kworker/0:0 Not tainted 3.12.0+ #13
       Hardware name:                  /D33217CK, BIOS GKPPT10H.86A.0042.2013.0422.1439 04/22/2013
       Workqueue: kacpi_hotplug acpi_hotplug_work_fn
        0000000000000009 ffff8801002459b0 ffffffff817daab1 ffff8801002459f8
        ffff8801002459e8 ffffffff810436b8 0000000000000000 ffffffff81c6f1e0
        ffff88006d440358 ffff88006d440188 ffff88006e8b4c28 ffff880100245a48
       Call Trace:
        [<ffffffff817daab1>] dump_stack+0x45/0x56
        [<ffffffff810436b8>] warn_slowpath_common+0x78/0xa0
        [<ffffffff81043727>] warn_slowpath_fmt+0x47/0x50
        [<ffffffff811ad319>] ? sysfs_get_dirent_ns+0x49/0x70
        [<ffffffff811ae526>] sysfs_remove_group+0xc6/0xd0
        [<ffffffff81432f7e>] dpm_sysfs_remove+0x3e/0x50
        [<ffffffff8142a0d0>] device_del+0x40/0x1b0
        [<ffffffff8142a24d>] device_unregister+0xd/0x20
        [<ffffffff8144131a>] scsi_remove_host+0xba/0x110
        [<ffffffff8145f526>] ata_host_detach+0xc6/0x100
        [<ffffffff8145f578>] ata_pci_remove_one+0x18/0x20
        [<ffffffff812e8f48>] pci_device_remove+0x28/0x60
        [<ffffffff8142d854>] __device_release_driver+0x64/0xd0
        [<ffffffff8142d8de>] device_release_driver+0x1e/0x30
        [<ffffffff8142d257>] bus_remove_device+0xf7/0x140
        [<ffffffff8142a1b1>] device_del+0x121/0x1b0
        [<ffffffff812e43d4>] pci_stop_bus_device+0x94/0xa0
        [<ffffffff812e437b>] pci_stop_bus_device+0x3b/0xa0
        [<ffffffff812e437b>] pci_stop_bus_device+0x3b/0xa0
        [<ffffffff812e44dd>] pci_stop_and_remove_bus_device+0xd/0x20
        [<ffffffff812fc743>] trim_stale_devices+0x73/0xe0
        [<ffffffff812fc78b>] trim_stale_devices+0xbb/0xe0
        [<ffffffff812fc78b>] trim_stale_devices+0xbb/0xe0
        [<ffffffff812fcb6e>] acpiphp_check_bridge+0x7e/0xd0
        [<ffffffff812fd90d>] hotplug_event+0xcd/0x160
        [<ffffffff812fd9c5>] hotplug_event_work+0x25/0x60
        [<ffffffff81316749>] acpi_hotplug_work_fn+0x17/0x22
        [<ffffffff8105cf3a>] process_one_work+0x17a/0x430
        [<ffffffff8105db29>] worker_thread+0x119/0x390
        [<ffffffff8105da10>] ? manage_workers.isra.25+0x2a0/0x2a0
        [<ffffffff81063a5d>] kthread+0xcd/0xf0
        [<ffffffff81063990>] ? kthread_create_on_node+0x180/0x180
        [<ffffffff817eb33c>] ret_from_fork+0x7c/0xb0
        [<ffffffff81063990>] ? kthread_create_on_node+0x180/0x180
      
      The source of this problem is that SCSI hosts are removed from
      ATA ports after calling ata_tport_delete() which removes the
      port's sysfs directory, among other things.  Now, after commit
      bcdde7e2, the sysfs directory is removed along with all of
      its subdirectories that include the SCSI host's sysfs directory
      and its subdirectories at this point.  Consequently, when
      device_del() is finally called for any child device of the SCSI
      host and tries to remove its "power" group (which is already
      gone then), it triggers the above warning.
      
      To make the warnings go away, change the removal ordering in
      ata_port_detach() so that the SCSI host is removed from the
      port before ata_tport_delete() is called.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=65281
      
      
      Reported-and-tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      c5700766
    • Peter Zijlstra's avatar
      cpuset: Fix memory allocator deadlock · 0fc0287c
      Peter Zijlstra authored
      
      
      Juri hit the below lockdep report:
      
      [    4.303391] ======================================================
      [    4.303392] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ]
      [    4.303394] 3.12.0-dl-peterz+ #144 Not tainted
      [    4.303395] ------------------------------------------------------
      [    4.303397] kworker/u4:3/689 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
      [    4.303399]  (&p->mems_allowed_seq){+.+...}, at: [<ffffffff8114e63c>] new_slab+0x6c/0x290
      [    4.303417]
      [    4.303417] and this task is already holding:
      [    4.303418]  (&(&q->__queue_lock)->rlock){..-...}, at: [<ffffffff812d2dfb>] blk_execute_rq_nowait+0x5b/0x100
      [    4.303431] which would create a new lock dependency:
      [    4.303432]  (&(&q->__queue_lock)->rlock){..-...} -> (&p->mems_allowed_seq){+.+...}
      [    4.303436]
      
      [    4.303898] the dependencies between the lock to be acquired and SOFTIRQ-irq-unsafe lock:
      [    4.303918] -> (&p->mems_allowed_seq){+.+...} ops: 2762 {
      [    4.303922]    HARDIRQ-ON-W at:
      [    4.303923]                     [<ffffffff8108ab9a>] __lock_acquire+0x65a/0x1ff0
      [    4.303926]                     [<ffffffff8108cbe3>] lock_acquire+0x93/0x140
      [    4.303929]                     [<ffffffff81063dd6>] kthreadd+0x86/0x180
      [    4.303931]                     [<ffffffff816ded6c>] ret_from_fork+0x7c/0xb0
      [    4.303933]    SOFTIRQ-ON-W at:
      [    4.303933]                     [<ffffffff8108abcc>] __lock_acquire+0x68c/0x1ff0
      [    4.303935]                     [<ffffffff8108cbe3>] lock_acquire+0x93/0x140
      [    4.303940]                     [<ffffffff81063dd6>] kthreadd+0x86/0x180
      [    4.303955]                     [<ffffffff816ded6c>] ret_from_fork+0x7c/0xb0
      [    4.303959]    INITIAL USE at:
      [    4.303960]                    [<ffffffff8108a884>] __lock_acquire+0x344/0x1ff0
      [    4.303963]                    [<ffffffff8108cbe3>] lock_acquire+0x93/0x140
      [    4.303966]                    [<ffffffff81063dd6>] kthreadd+0x86/0x180
      [    4.303969]                    [<ffffffff816ded6c>] ret_from_fork+0x7c/0xb0
      [    4.303972]  }
      
      Which reports that we take mems_allowed_seq with interrupts enabled. A
      little digging found that this can only be from
      cpuset_change_task_nodemask().
      
      This is an actual deadlock because an interrupt doing an allocation will
      hit get_mems_allowed()->...->__read_seqcount_begin(), which will spin
      forever waiting for the write side to complete.
      
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Mel Gorman <mgorman@suse.de>
      Reported-by: default avatarJuri Lelli <juri.lelli@gmail.com>
      Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Tested-by: default avatarJuri Lelli <juri.lelli@gmail.com>
      Acked-by: default avatarLi Zefan <lizefan@huawei.com>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      0fc0287c
    • Greg Kroah-Hartman's avatar
      Revert "sysfs: handle duplicate removal attempts in sysfs_remove_group()" · 81440e73
      Greg Kroah-Hartman authored
      This reverts commit 54d71145
      
      .
      
      The root cause of these "inverted" sysfs removals have now been found,
      so there is no need for this patch.  Keep this functionality around so
      that this type of error doesn't show up in driver code again.
      
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      81440e73
    • Greg Kroah-Hartman's avatar
      Staging: tidspbridge: disable driver · 930ba4a3
      Greg Kroah-Hartman authored
      
      
      There seems to be no active maintainer for the driver, and there is an
      unfixed security bug, so disable the driver for now.
      
      Hopefully someone steps up to be the maintainer, and works to get this
      out of staging, otherwise it will be deleted soon.
      
      Reported-by: default avatarNico Golde <nico@ngolde.de>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
      Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
      Cc: Kanigeri, Hari <h-kanigeri2@ti.com>
      Cc: Ameya Palande <ameya.palande@nokia.com>
      Cc: Guzman Lugo, Fernando <fernando.lugo@ti.com>
      Cc: Hebbar, Shivananda <x0hebbar@ti.com>
      Cc: Ramos Falcon, Ernesto <ernesto@ti.com>
      Cc: Felipe Contreras <felipe.contreras@gmail.com>
      Cc: Anna, Suman <s-anna@ti.com>
      Cc: Gupta, Ramesh <grgupta@ti.com>
      Cc: Gomez Castellanos, Ivan <ivan.gomez@ti.com>
      Cc: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
      Cc: Armando Uribe De Leon <x0095078@ti.com>
      Cc: Deepak Chitriki <deepak.chitriki@ti.com>
      Cc: Menon, Nishanth <nm@ti.com>
      Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
      Cc: Ohad Ben-Cohen <ohad@wizery.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      930ba4a3
  4. Nov 27, 2013
    • Markus Mayer's avatar
      gpio: bcm281xx: Fix return value of bcm_kona_gpio_get() · e2f0b005
      Markus Mayer authored
      
      
      We need to return the corresponding bit for a particular GPIO. This bit
      contains shift not mask.
      
      Signed-off-by: default avatarMarkus Mayer <markus.mayer@linaro.org>
      Reviewed-by: default avatarTim Kryger <tim.kryger@linaro.org>
      Reviewed-by: default avatarMatt Porter <matt.porter@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      e2f0b005
    • Takashi Iwai's avatar
      ALSA: hda - Fix hp-mic mode without VREF bits · 16c0cefe
      Takashi Iwai authored
      When the hp mic pin has no VREF bits, the driver forgot to set PIN_IN
      bit.  Spotted during debugging old MacBook Airs.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65681
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      16c0cefe
    • Takashi Iwai's avatar
      ALSA: hda - Create Headhpone Mic Jack Mode when really needed · ced4cefc
      Takashi Iwai authored
      When a headphone jack is configurable as input, the generic parser
      tries to make it retaskable as Headphone Mic.  The switching can be
      done smoothly if Capture Source control exists (i.e. there is another
      input source).  Or when user explicitly enables the creation of jack
      mode controls, "Headhpone Mic Jack Mode" will be created accordingly.
      
      However, if the headphone mic is the only input source, we have to
      create "Headphone Mic Jack Mode" control because there is no capture
      source selection.  Otherwise, the generic parser assumes that the
      input is constantly enabled, thus the headphone is permanently set
      as input.  This situation happens on the old MacBook Airs where no
      input is supported properly, for example.
      
      This patch fixes the problem: now "Headphone Mic Jack Mode" is created
      when such an input selection isn't possible.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65681
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ced4cefc
    • Linus Walleij's avatar
      gpio: pl061: move irqdomain initialization · 2ba3154d
      Linus Walleij authored
      
      
      The PL061 driver had the irqdomain initialization in an unfortunate
      place: when used with device tree (and thus passing the base IRQ
      0) the driver would work, as this registers an irqdomain and waits
      for mappings to be done dynamically as the devices request their
      IRQs, whereas when booting using platform data the irqdomain core
      would attempt to allocate IRQ descriptors dynamically (which works
      fine) but also to associate the irq_domain_associate_many() on all
      IRQs, which in turn will call the mapping function which at this
      point will try to set the type of the IRQ and then tries to acquire
      a non-initialized spinlock yielding a backtrace like this:
      
      CPU: 0 PID: 1 Comm: swapper Not tainted 3.13.0-rc1+ #652
      Backtrace:
      [<c0016f0c>] (dump_backtrace) from [<c00172ac>] (show_stack+0x18/0x1c)
       r6:c798ace0 r5:00000000 r4:c78257e0 r3:00200140
      [<c0017294>] (show_stack) from [<c0329ea0>] (dump_stack+0x20/0x28)
      [<c0329e80>] (dump_stack) from [<c004fa80>] (__lock_acquire+0x1c0/0x1b80)
      [<c004f8c0>] (__lock_acquire) from [<c0051970>] (lock_acquire+0x6c/0x80)
       r10:00000000 r9:c0455234 r8:00000060 r7:c047d798 r6:600000d3 r5:00000000
       r4:c782c000
      [<c0051904>] (lock_acquire) from [<c032e484>] (_raw_spin_lock_irqsave+0x60/0x74)
       r6:c01a1100 r5:800000d3 r4:c798acd0
      [<c032e424>] (_raw_spin_lock_irqsave) from [<c01a1100>] (pl061_irq_type+0x28/0x)
       r6:00000000 r5:00000000 r4:c798acd0
      [<c01a10d8>] (pl061_irq_type) from [<c0059ef4>] (__irq_set_trigger+0x70/0x104)
       r6:00000000 r5:c01a10d8 r4:c046da1c r3:c01a10d8
      [<c0059e84>] (__irq_set_trigger) from [<c005b348>] (irq_set_irq_type+0x40/0x60)
       r10:c043240c r8:00000060 r7:00000000 r6:c046da1c r5:00000060 r4:00000000
      [<c005b308>] (irq_set_irq_type) from [<c01a1208>] (pl061_irq_map+0x40/0x54)
       r6:c79693c0 r5:c798acd0 r4:00000060
      [<c01a11c8>] (pl061_irq_map) from [<c005d27c>] (irq_domain_associate+0xc0/0x190)
       r5:00000060 r4:c046da1c
      [<c005d1bc>] (irq_domain_associate) from [<c005d604>] (irq_domain_associate_man)
       r8:00000008 r7:00000000 r6:c79693c0 r5:00000060 r4:00000000
      [<c005d5d0>] (irq_domain_associate_many) from [<c005d864>] (irq_domain_add_simp)
       r8:c046578c r7:c035b72c r6:c79693c0 r5:00000060 r4:00000008 r3:00000008
      [<c005d814>] (irq_domain_add_simple) from [<c01a1380>] (pl061_probe+0xc4/0x22c)
       r6:00000060 r5:c0464380 r4:c798acd0
      [<c01a12bc>] (pl061_probe) from [<c01c0450>] (amba_probe+0x74/0xe0)
       r10:c043240c r9:c0455234 r8:00000000 r7:c047d7f8 r6:c047d744 r5:00000000
       r4:c0464380
      
      This moves the irqdomain initialization to a point where the spinlock
      and GPIO chip are both fully propulated, so the callbacks can be used
      without crashes.
      
      I had some problem reproducing the crash, as the devm_kzalloc():ed
      zeroed memory would seemingly mask the spinlock as something OK,
      but by poisoning the lock like this:
      
      u32 *dum;
      dum = (u32 *) &chip->lock;
      *dum = 0xaaaaaaaaU;
      
      I could reproduce, fix and test the patch.
      
      Reported-by: default avatarRussell King <linux@arm.linux.org.uk>
      Cc: Rob Herring <robherring2@gmail.com>
      Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
      Cc: Baruch Siach <baruch@tkos.co.il>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      2ba3154d
    • Thomas Pugliese's avatar
      ALSA: usb: use multiple packets per urb for Wireless USB inbound audio · a93455e1
      Thomas Pugliese authored
      
      
      For Wireless USB audio devices, use multiple isoc packets per URB for
      inbound endpoints with a datainterval < 5.  This allows the WUSB host
      controller to take advantage of bursting to service endpoints whose
      logical polling interval is less than the 4ms minimum polling interval
      limit in WUSB.
      
      Signed-off-by: default avatarThomas Pugliese <thomas.pugliese@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a93455e1