1. 21 May, 2014 2 commits
    • Linus Torvalds's avatar
      Merge tag 'dm-3.15-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 23de4a7a
      Linus Torvalds authored
      Pull device mapper fixes from Mike Snitzer:
       "A dm-crypt fix for a cpu hotplug crash that switches from using
        per-cpu data to a mempool allocation (which offers allocation with cpu
        locality, and there is no inter-cpu communication on slab allocation).
      
        A couple dm-thinp stable fixes to address "out-of-data-space" issues.
      
        A dm-multipath fix for a LOCKDEP warning introduced in 3.15-rc1"
      
      * tag 'dm-3.15-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm mpath: fix lock order inconsistency in multipath_ioctl
        dm thin: add timeout to stop out-of-data-space mode holding IO forever
        dm thin: allow metadata commit if pool is in PM_OUT_OF_DATA_SPACE mode
        dm crypt: fix cpu hotplug crash by removing per-cpu structure
      23de4a7a
    • Linus Torvalds's avatar
      Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux · 31a3fcab
      Linus Torvalds authored
      Pull device tree fixes from Grant Likely:
       "Drivercore bugfixes for v3.15
      
        This branch contains bug fixes important to get into v3.15.  There is
        a fix for modifying properties seen during early boot, a fix for an
        incorrect prototype when CONFIG_OF=n, and a couple of corrections to
        device tree memory nodes on a few platforms"
      
      * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
        mips: dts: Fix missing device_type="memory" property in memory nodes
        arm: dts: Fix missing device_type="memory" for ste-ccu8540
        of: fix CONFIG_OF=n prototype of of_node_full_name()
        of: make of_update_property() usable earlier in the boot process
      31a3fcab
  2. 20 May, 2014 9 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 60b5f90d
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Unfortunately this update became bigger than previous pull requests,
        which is almost a pattern in rc5-6.  But, the only obvious big changes
        are for the new Intel DSP ASoC drivers, so the impact must be fairly
        limited.
      
        Other than that, usual small fixes in various fields: HD-audio, ASoC
        core and ASoC fsl and codec drivers"
      
      * tag 'sound-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
        ALSA: sb_mixer: missing return statement
        ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile
        ASoC: Intel: Fix Baytrail SST DSP firmware loading
        ALSA: hda - mask buggy stream DMA0 for Broadwell display controller
        ALSA: hda - Add new GPU codec ID to snd-hda
        ASoC: fsl_esai: Set PCRC and PRRC registers at the end of hw_params()
        ASoC: fsl_esai: Only bypass sck_div for EXTAL source
        ASoC: fsl_esai: Fix incorrect condition within ratio range check for FP
        ASoC: dapm: Fix SUSPEND -> OFF bias sequence
        ASoC: dapm: Skip CODEC<->CODEC links in connect_dai_link_widgets()
        ASoC: pcm: Fix incorrect condition check for case SNDRV_PCM_TRIGGER_SUSPEND
        ALSA: hda - add headset mic detect quirks for three Dell laptops
        ASoC: Update Cirrus Logic CODEC maintainers.
        ASoC: Intel: Fix block offset calculations.
        ASoC: Intel: Fix check for pdata usage before dereference.
        ASoC: Intel: Fix stream position pointer.
        ASoC: Intel: Fix allow hw_params to be called more than once.
        ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.
        ASoC: Intel: Fix Haswell/Broadwell DSP page table creation.
        ASoC: Intel: Fix allocated block list usage when adding blocks.
        ...
      60b5f90d
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · c7d6891a
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "MIPS fixes for various loose ends:
      
         - Fix workarounds for R4000 erratum.
         - Patch up DEC, Siemens-Nixdorf and Loongson hardware support.
         - Wire up renameat2 syscall.
         - Delete unused file - it was causing false warnings from maintenance
           scripts.
         - Revert a patch because it's functionality is now implemented twice
           which causes superfluous /proc/cpuinfo output.
         - Fix a microMIPS regression"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: mm: Fix broken microMIPS kernel regression.
        MIPS: Add new AUDIT_ARCH token for the N32 ABI on MIPS64
        MIPS: Wire up renameat2 syscall.
        MIPS: inst.h: Rename BITFIELD_FIELD to __BITFIELD_FIELD.
        MIPS: Remove file missed when removing rm9k support a while ago.
        MIPS/loongson2_cpufreq: Fix CPU clock rate setting
        MIPS: Loongson: No need to select GENERIC_HARDIRQS_NO__DO_IRQ
        MIPS: csum_partial.S CPU_DADDI_WORKAROUNDS bug fix
        MIPS: __strncpy_from_user_asm CPU_DADDI_WORKAROUNDS bug fix
        MIPS: __delay CPU_DADDI_WORKAROUNDS bug fix
        MIPS: DEC/SNI: O32 wrapper stack switching fixes
        MIPS: DEC: Bus error handler <asm/cpu-type.h> fixes
        MAINTAINERS: TURBOchannel: Update entry
        Revert "MIPS: MT: proc: Add support for printing VPE and TC ids"
      c7d6891a
    • Linus Torvalds's avatar
      Merge branch 'parisc-3.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 6ed8bf82
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "There are two patches in here:
      
        The first patch greatly improves latency and corrects the memory
        ordering in our light-weight atomic locking syscall.
      
        The second patch ratelimits printing of userspace segfaults in the
        same way as it's done on other platforms.  This fixes a possible DOS
        on parisc since it prevents the syslog to grow too fast.  For example,
        when the debian acl2 package was built on our debian buildd servers,
        this package produced lots of gigabytes in syslog in very short time
        and thus filled our harddisks, which then turned the server nearly
        completely unaccessible and unresponsive"
      
      * 'parisc-3.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Improve LWS-CAS performance
        parisc: ratelimit userspace segfault printing
      6ed8bf82
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8d900e7f
      Linus Torvalds authored
      Pull two arm64 fixes from Catalin Marinas:
       - arm64 migrate_irqs() fix following commit ffde1de6 (irqchip: Gic:
         Support forced affinity setting)
       - fix arm64 pud_huge() to return 0 when only 2 levels page tables are
         used (__PAGETABLE_PMD_FOLDED defined and pmd_huge already covers
         block entries at the first level), otherwise KVM gets confused
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: fix pud_huge() for 2-level pagetables
        arm64: use cpu_online_mask when using forced irq_set_affinity
      8d900e7f
    • Linus Torvalds's avatar
      Merge tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag · 41abc902
      Linus Torvalds authored
      Pull Metag architecture and related fixes from James Hogan:
       "Mostly fixes for metag and parisc relating to upgrowing stacks.
      
         - Fix missing compiler barriers in metag memory barriers.
         - Fix BUG_ON on metag when RLIMIT_STACK hard limit is increased
           beyond safe value.
         - Make maximum stack size configurable.  This reduces the default
           user stack size back to 80MB (especially on parisc after their
           removal of _STK_LIM_MAX override).  This only affects metag and
           parisc.
         - Remove metag _STK_LIM_MAX override to match other arches and follow
           parisc, now that it is safe to do so (due to the BUG_ON fix
           mentioned above).
         - Finally now that both metag and parisc _STK_LIM_MAX overrides have
           been removed, it makes sense to remove _STK_LIM_MAX altogether"
      
      * tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
        asm-generic: remove _STK_LIM_MAX
        metag: Remove _STK_LIM_MAX override
        parisc,metag: Do not hardcode maximum userspace stack size
        metag: Reduce maximum stack size to 256MB
        metag: fix memory barriers
      41abc902
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · a7b08063
      Linus Torvalds authored
      Pull drm/intel fixes from Dave Airlie:
       "Just some intel fixes.
      
        I have some radeon ones but I need to get some patches dropped from
        the pull req"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: Increase WM memory latency values on SNB
        drm/i915: restore backlight precision when converting from ACPI
        drm/i915: Use the first mode if there is no preferred mode in the EDID
        drm/i915/dp: force eDP lane count to max available lanes on BDW
        drm/i915/vlv: reset VLV media force wake request register
        drm/i915/SDVO: For sysfs link put directory and target in correct order
        drm/i915: use lane count and link rate from VBT as minimums for eDP
        drm/i915: clean up VBT eDP link param decoding
        drm/i915: consider the source max DP lane count too
      a7b08063
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 172de656
      Linus Torvalds authored
      Pull x86 fixes from Peter Anvin.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86-64, modify_ldt: Make support for 16-bit segments a runtime option
        x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow()
        x86, rdrand: When nordrand is specified, disable RDSEED as well
      172de656
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 95d08585
      Linus Torvalds authored
      Pull timer fix from Thomas Gleixner:
       "A single bug fix for a long standing issue:
      
         - Updating the expiry value of a relative timer _after_ letting the
           idle logic select a target cpu for the timer based on its stale
           expiry value is outright stupid.  Thanks to Viresh for spotting the
           brainfart"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        hrtimer: Set expiry time before switch_hrtimer_base()
      95d08585
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3f017a4c
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Two small updates from the irq departement:
      
         - Provide missing inline stub for a SMP only function
      
         - Add sub-maintainer for the drivers/irqchip/ part of the irq
           subsystem.  YAY!"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MAINTAINERS: Add co-maintainer for drivers/irqchip
        genirq: Provide irq_force_affinity fallback for non-SMP
      3f017a4c
  3. 19 May, 2014 1 commit
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2014-05-16' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 4ba4801d
      Dave Airlie authored
      Intel fixes for regressions, black screens and hangs, for 3.15.
      
      * tag 'drm-intel-fixes-2014-05-16' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Increase WM memory latency values on SNB
        drm/i915: restore backlight precision when converting from ACPI
        drm/i915: Use the first mode if there is no preferred mode in the EDID
        drm/i915/dp: force eDP lane count to max available lanes on BDW
        drm/i915/vlv: reset VLV media force wake request register
        drm/i915/SDVO: For sysfs link put directory and target in correct order
        drm/i915: use lane count and link rate from VBT as minimums for eDP
        drm/i915: clean up VBT eDP link param decoding
        drm/i915: consider the source max DP lane count too
      4ba4801d
  4. 16 May, 2014 3 commits
    • Mark Salter's avatar
      arm64: fix pud_huge() for 2-level pagetables · 4797ec2d
      Mark Salter authored
      The following happens when trying to run a kvm guest on a kernel
      configured for 64k pages. This doesn't happen with 4k pages:
      
        BUG: failure at include/linux/mm.h:297/put_page_testzero()!
        Kernel panic - not syncing: BUG!
        CPU: 2 PID: 4228 Comm: qemu-system-aar Tainted: GF            3.13.0-0.rc7.31.sa2.k32v1.aarch64.debug #1
        Call trace:
        [<fffffe0000096034>] dump_backtrace+0x0/0x16c
        [<fffffe00000961b4>] show_stack+0x14/0x1c
        [<fffffe000066e648>] dump_stack+0x84/0xb0
        [<fffffe0000668678>] panic+0xf4/0x220
        [<fffffe000018ec78>] free_reserved_area+0x0/0x110
        [<fffffe000018edd8>] free_pages+0x50/0x88
        [<fffffe00000a759c>] kvm_free_stage2_pgd+0x30/0x40
        [<fffffe00000a5354>] kvm_arch_destroy_vm+0x18/0x44
        [<fffffe00000a1854>] kvm_put_kvm+0xf0/0x184
        [<fffffe00000a1938>] kvm_vm_release+0x10/0x1c
        [<fffffe00001edc1c>] __fput+0xb0/0x288
        [<fffffe00001ede4c>] ____fput+0xc/0x14
        [<fffffe00000d5a2c>] task_work_run+0xa8/0x11c
        [<fffffe0000095c14>] do_notify_resume+0x54/0x58
      
      In arch/arm/kvm/mmu.c:unmap_range(), we end up doing an extra put_page()
      on the stage2 pgd which leads to the BUG in put_page_testzero(). This
      happens because a pud_huge() test in unmap_range() returns true when it
      should always be false with 2-level pages tables used by 64k pages.
      This patch removes support for huge puds if 2-level pagetables are
      being used.
      Signed-off-by: default avatarMark Salter <msalter@redhat.com>
      [catalin.marinas@arm.com: removed #ifndef around PUD_SIZE check]
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: <stable@vger.kernel.org> # v3.11+
      4797ec2d
    • Leif Lindholm's avatar
      mips: dts: Fix missing device_type="memory" property in memory nodes · dfc44f80
      Leif Lindholm authored
      A few platforms lack a 'device_type = "memory"' for their memory
      nodes, relying on an old ppc quirk in order to discover its memory.
      Add the missing data so that all parsing code can find memory nodes
      correctly.
      Signed-off-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
      Cc: linux-mips@linux-mips.org
      Cc: devicetree@vger.kernel.org
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: <stable@vger.kernel.org>
      Acked-by: default avatarJohn Crispin <blogic@openwrt.org>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      dfc44f80
    • Leif Lindholm's avatar
      arm: dts: Fix missing device_type="memory" for ste-ccu8540 · bfaed5ab
      Leif Lindholm authored
      The current .dts for ste-ccu8540 lacks a 'device_type = "memory"' for
      its memory node, relying on an old ppc quirk in order to discover its
      memory. Fix the data so that all parsing code can handle it correctly.
      Signed-off-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: devicetree@vger.kernel.org
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      bfaed5ab
  5. 15 May, 2014 7 commits
  6. 14 May, 2014 18 commits
    • Linus Torvalds's avatar
      x86-64, modify_ldt: Make support for 16-bit segments a runtime option · fa81511b
      Linus Torvalds authored
      Checkin:
      
      b3b42ac2 x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels
      
      disabled 16-bit segments on 64-bit kernels due to an information
      leak.  However, it does seem that people are genuinely using Wine to
      run old 16-bit Windows programs on Linux.
      
      A proper fix for this ("espfix64") is coming in the upcoming merge
      window, but as a temporary fix, create a sysctl to allow the
      administrator to re-enable support for 16-bit segments.
      
      It adds a "/proc/sys/abi/ldt16" sysctl that defaults to zero (off). If
      you hit this issue and care about your old Windows program more than
      you care about a kernel stack address information leak, you can do
      
         echo 1 > /proc/sys/abi/ldt16
      
      as root (add it to your startup scripts), and you should be ok.
      
      The sysctl table is only added if you have COMPAT support enabled on
      x86-64, but I assume anybody who runs old windows binaries very much
      does that ;)
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Link: http://lkml.kernel.org/r/CA%2B55aFw9BPoD10U1LfHbOMpHWZkvJTkMcfCs9s3urPr1YyWBxw@mail.gmail.com
      Cc: <stable@vger.kernel.org>
      fa81511b
    • James Hogan's avatar
      asm-generic: remove _STK_LIM_MAX · ffe6902b
      James Hogan authored
      _STK_LIM_MAX could be used to override the RLIMIT_STACK hard limit from
      an arch's include/uapi/asm-generic/resource.h file, but is no longer
      used since both parisc and metag removed the override. Therefore remove
      it entirely, setting the hard RLIMIT_STACK limit to RLIM_INFINITY
      directly in include/asm-generic/resource.h.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: linux-arch@vger.kernel.org
      Cc: Helge Deller <deller@gmx.de>
      Cc: John David Anglin <dave.anglin@bell.net>
      ffe6902b
    • James Hogan's avatar
      metag: Remove _STK_LIM_MAX override · c70458f5
      James Hogan authored
      Meta overrode _STK_LIM_MAX (the default RLIMIT_STACK hard limit) to
      256MB, apparently in an attempt to prevent setup_arg_pages's
      STACK_GROWSUP code from choosing the maximum stack size of 1GB, which is
      far too large for Meta's limited virtual address space and hits a BUG_ON
      (stack_top is usually 0x3ffff000).
      
      However the commit "metag: Reduce maximum stack size to 256MB" reduces
      the absolute stack size limit to a safe value for metag. This allows the
      default _STK_LIM_MAX override to be removed, bringing the default
      behaviour in line with all other architectures. Parisc in particular
      recently removed their override of _STK_LIMT_MAX in commit e0d8898d
      (parisc: remove _STK_LIM_MAX override) since it subtly affects stack
      allocation semantics in userland. Meta's uapi/asm/resource.h can now be
      removed and switch to using generic-y.
      Suggested-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: linux-metag@vger.kernel.org
      Cc: John David Anglin <dave.anglin@bell.net>
      c70458f5
    • Helge Deller's avatar
      parisc,metag: Do not hardcode maximum userspace stack size · 042d27ac
      Helge Deller authored
      This patch affects only architectures where the stack grows upwards
      (currently parisc and metag only). On those do not hardcode the maximum
      initial stack size to 1GB for 32-bit processes, but make it configurable
      via a config option.
      
      The main problem with the hardcoded stack size is, that we have two
      memory regions which grow upwards: stack and heap. To keep most of the
      memory available for heap in a flexmap memory layout, it makes no sense
      to hard allocate up to 1GB of the memory for stack which can't be used
      as heap then.
      
      This patch makes the stack size for 32-bit processes configurable and
      uses 80MB as default value which has been in use during the last few
      years on parisc and which hasn't showed any problems yet.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: linux-parisc@vger.kernel.org
      Cc: linux-metag@vger.kernel.org
      Cc: John David Anglin <dave.anglin@bell.net>
      042d27ac
    • James Hogan's avatar
      metag: Reduce maximum stack size to 256MB · d71f290b
      James Hogan authored
      Specify the maximum stack size for arches where the stack grows upward
      (parisc and metag) in asm/processor.h rather than hard coding in
      fs/exec.c so that metag can specify a smaller value of 256MB rather than
      1GB.
      
      This fixes a BUG on metag if the RLIMIT_STACK hard limit is increased
      beyond a safe value by root. E.g. when starting a process after running
      "ulimit -H -s unlimited" it will then attempt to use a stack size of the
      maximum 1GB which is far too big for metag's limited user virtual
      address space (stack_top is usually 0x3ffff000):
      
      BUG: failure at fs/exec.c:589/shift_arg_pages()!
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: linux-parisc@vger.kernel.org
      Cc: linux-metag@vger.kernel.org
      Cc: John David Anglin <dave.anglin@bell.net>
      Cc: stable@vger.kernel.org # only needed for >= v3.9 (arch/metag)
      d71f290b
    • Mikulas Patocka's avatar
      metag: fix memory barriers · 2425ce84
      Mikulas Patocka authored
      Volatile access doesn't really imply the compiler barrier. Volatile access
      is only ordered with respect to other volatile accesses, it isn't ordered
      with respect to general memory accesses. Gcc may reorder memory accesses
      around volatile access, as we can see in this simple example (if we
      compile it with optimization, both increments of *b will be collapsed to
      just one):
      
      void fn(volatile int *a, long *b)
      {
      	(*b)++;
      	*a = 10;
      	(*b)++;
      }
      
      Consequently, we need the compiler barrier after a write to the volatile
      variable, to make sure that the compiler doesn't reorder the volatile
      write with something else.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      2425ce84
    • Mike Snitzer's avatar
      dm mpath: fix lock order inconsistency in multipath_ioctl · 4cdd2ad7
      Mike Snitzer authored
      Commit 3e9f1be1 ("dm mpath: remove process_queued_ios()") did not
      consistently take the multipath device's spinlock (m->lock) before
      calling dm_table_run_md_queue_async() -- which takes the q->queue_lock.
      
      Found with code inspection using hint from reported lockdep warning.
      Reported-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      4cdd2ad7
    • Joe Thornber's avatar
      dm thin: add timeout to stop out-of-data-space mode holding IO forever · 85ad643b
      Joe Thornber authored
      If the pool runs out of data space, dm-thin can be configured to
      either error IOs that would trigger provisioning, or hold those IOs
      until the pool is resized.  Unfortunately, holding IOs until the pool is
      resized can result in a cascade of tasks hitting the hung_task_timeout,
      which may render the system unavailable.
      
      Add a fixed timeout so IOs can only be held for a maximum of 60 seconds.
      If LVM is going to resize a thin-pool that is out of data space it needs
      to be prompt about it.
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # 3.14+
      85ad643b
    • Joe Thornber's avatar
      dm thin: allow metadata commit if pool is in PM_OUT_OF_DATA_SPACE mode · 8d07e8a5
      Joe Thornber authored
      Commit 3e1a0699 ("dm thin: fix out of data space handling") introduced
      a regression in the metadata commit() method by returning an error if
      the pool is in PM_OUT_OF_DATA_SPACE mode.  This oversight caused a thin
      device to return errors even if the default queue_if_no_space ENOSPC
      handling mode is used.
      
      Fix commit() to only fail if pool is in PM_READ_ONLY or PM_FAIL mode.
      
      Reported-by: qindehua@163.com
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # 3.14+
      8d07e8a5
    • Mikulas Patocka's avatar
      dm crypt: fix cpu hotplug crash by removing per-cpu structure · 610f2de3
      Mikulas Patocka authored
      The DM crypt target used per-cpu structures to hold pointers to a
      ablkcipher_request structure.  The code assumed that the work item keeps
      executing on a single CPU, so it didn't use synchronization when
      accessing this structure.
      
      If a CPU is disabled by writing 0 to /sys/devices/system/cpu/cpu*/online,
      the work item could be moved to another CPU.  This causes dm-crypt
      crashes, like the following, because the code starts using an incorrect
      ablkcipher_request:
      
       smpboot: CPU 7 is now offline
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000130
       IP: [<ffffffffa1862b3d>] crypt_convert+0x12d/0x3c0 [dm_crypt]
       ...
       Call Trace:
        [<ffffffffa1864415>] ? kcryptd_crypt+0x305/0x470 [dm_crypt]
        [<ffffffff81062060>] ? finish_task_switch+0x40/0xc0
        [<ffffffff81052a28>] ? process_one_work+0x168/0x470
        [<ffffffff8105366b>] ? worker_thread+0x10b/0x390
        [<ffffffff81053560>] ? manage_workers.isra.26+0x290/0x290
        [<ffffffff81058d9f>] ? kthread+0xaf/0xc0
        [<ffffffff81058cf0>] ? kthread_create_on_node+0x120/0x120
        [<ffffffff813464ac>] ? ret_from_fork+0x7c/0xb0
        [<ffffffff81058cf0>] ? kthread_create_on_node+0x120/0x120
      
      Fix this bug by removing the per-cpu definition.  The structure
      ablkcipher_request is accessed via a pointer from convert_context.
      Consequently, if the work item is rescheduled to a different CPU, the
      thread still uses the same ablkcipher_request.
      
      This change may undermine performance improvements intended by commit
      c0297721 ("dm crypt: scale to multiple cpus") on select hardware.  In
      practice no performance difference was observed on recent hardware.  But
      regardless, correctness is more important than performance.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      610f2de3
    • Steven J. Hill's avatar
      MIPS: mm: Fix broken microMIPS kernel regression. · 7bb39409
      Steven J. Hill authored
      Commit f4ae17aa [MIPS: mm: Use scratch for
      PGD when !CONFIG_MIPS_PGD_C0_CONTEXT] broke microMIPS kernel builds. This
      patch refactors that code similar to what was done for the 'clear_page'
      and 'copy_page' functions.
      Signed-off-by: default avatarSteven J. Hill <Steven.Hill@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/6744/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      7bb39409
    • Dan Carpenter's avatar
      ALSA: sb_mixer: missing return statement · 665ebe92
      Dan Carpenter authored
      The if condition here was supposed to return on error but the return
      statement is missing.  The effect is that the ->mixername is set to
      "???" instead of "DT019X".
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      665ebe92
    • Thomas Petazzoni's avatar
      of: make of_update_property() usable earlier in the boot process · 582da652
      Thomas Petazzoni authored
      Commit 75b57ecf ('of: Make device
      nodes kobjects so they show up in sysfs') has turned Device Tree nodes
      in kobjects and added a sysfs based representation for Device Tree
      nodes. Since the sysfs logic is only available after the execution of
      a core_initcall(), the patch took precautions in of_add_property() and
      of_remove_property() to not do any sysfs related manipulation early in
      the boot process.
      
      However, it forgot to do the same for of_update_property(), which if
      used early in the boot process (before core_initcalls have been
      called), tries to call sysfs_remove_bin_file(), and crashes:
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 0 at /home/thomas/projets/linux-2.6/fs/kernfs/dir.c:1216 kernfs_remove_by_name_ns+0x80/0x88()
      kernfs: can not remove '(null)', no directory
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.15.0-rc1-00127-g1d7e7b2-dirty #423
      [<c0014910>] (unwind_backtrace) from [<c00110ec>] (show_stack+0x10/0x14)
      [<c00110ec>] (show_stack) from [<c04c84b8>] (dump_stack+0x84/0x94)
      [<c04c84b8>] (dump_stack) from [<c001d8c0>] (warn_slowpath_common+0x6c/0x88)
      [<c001d8c0>] (warn_slowpath_common) from [<c001d90c>] (warn_slowpath_fmt+0x30/0x40)
      [<c001d90c>] (warn_slowpath_fmt) from [<c0104468>] (kernfs_remove_by_name_ns+0x80/0x88)
      [<c0104468>] (kernfs_remove_by_name_ns) from [<c0394d98>] (of_update_property+0xc0/0xf0)
      [<c0394d98>] (of_update_property) from [<c0647248>] (mvebu_timer_and_clk_init+0xfc/0x194)
      [<c0647248>] (mvebu_timer_and_clk_init) from [<c0640934>] (start_kernel+0x218/0x350)
      [<c0640934>] (start_kernel) from [<00008070>] (0x8070)
      ---[ end trace 3406ff24bd97382e ]---
      Unable to handle kernel NULL pointer dereference at virtual address 0000003c
      pgd = c0004000
      [0000003c] *pgd=00000000
      Internal error: Oops: 5 [#1] SMP ARM
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W     3.15.0-rc1-00127-g1d7e7b2-dirty #423
      task: c10ad4d8 ti: c10a2000 task.ti: c10a2000
      PC is at kernfs_find_ns+0x8/0xf0
      LR is at kernfs_find_and_get_ns+0x30/0x48
      pc : [<c0103834>]    lr : [<c010394c>]    psr: 600001d3
      sp : c10a3f34  ip : 00000073  fp : 00000000
      r10: 00000000  r9 : cfffc240  r8 : cfdf2980
      r7 : cf812c00  r6 : 00000000  r5 : 00000000  r4 : c10b45e0
      r3 : c10ad4d8  r2 : 00000000  r1 : cf812c00  r0 : 00000000
      Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c53c7d  Table: 0000404a  DAC: 00000015
      Process swapper/0 (pid: 0, stack limit = 0xc10a2240)
      Stack: (0xc10a3f34 to 0xc10a4000)
      3f20:                                              c10b45e0 00000000 00000000
      3f40: cf812c00 c010394c 00000063 cf812c00 00000001 cf812c00 cfdf29ac c03932cc
      3f60: 00000063 cf812bc0 cfdf29ac cf812c00 ffffffff c03943f8 cfdf2980 c0104468
      3f80: cfdf2a04 cfdf2980 cf812bc0 c06634b0 c10aa3c0 c0394da4 c10f74dc cfdf2980
      3fa0: cf812bc0 c0647248 c10aa3c0 ffffffff c10de940 c10aa3c0 ffffffff c0640934
      3fc0: ffffffff ffffffff c06404ec 00000000 00000000 c06634b0 00000000 10c53c7d
      3fe0: c10aa434 c06634ac c10ae4c8 0000406a 414fc091 00008070 00000000 00000000
      [<c0103834>] (kernfs_find_ns) from [<00000001>] (0x1)
      Code: e5c89001 eaffffcf e92d40f0 e1a06002 (e1d023bc)
      ---[ end trace 3406ff24bd97382f ]---
      Kernel panic - not syncing: Attempted to kill the idle task!
      ---[ end Kernel panic - not syncing: Attempted to kill the idle task!
      
      To fix this problem, we simply skip the sysfs related calls in
      of_update_property(), and rely on of_init() to fix up things when it
      will be called, exactly as is done in of_add_property() and
      of_remove_property().
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Fixes: 75b57ecf ("of: Make device nodes kobjects so they show up in sysfs")
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      582da652
    • Takashi Iwai's avatar
      Merge tag 'asoc-v3.15-rc5-intel' of... · ff2354bc
      Takashi Iwai authored
      Merge tag 'asoc-v3.15-rc5-intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Intel fixes for v3.15
      
      This is a relatively large batch of fixes for the newly added
      Haswell/Baytrail drivers from Intel.  It's a bit larger than is good for
      this point in the cycle but it's all for a newly added driver so not so
      worrying as it might otherwise be.  Some of it's integration problems,
      some of it's the sort of problem usually turned up in stress tests.
      ff2354bc
    • Takashi Iwai's avatar
      Merge tag 'asoc-v3.15-rc5-drivers' of... · 7ca33c7a
      Takashi Iwai authored
      Merge tag 'asoc-v3.15-rc5-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Driver fixes for v3.15
      
      A small set of driver fixes, nothing remarkable in itself or of any
      relevance outside of the driver.
      7ca33c7a
    • Takashi Iwai's avatar
      Merge tag 'asoc-v3.15-rc5-core' of... · 927cdab3
      Takashi Iwai authored
      Merge tag 'asoc-v3.15-rc5-core' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Core fixes for v3.15
      
      A few things here:
      
       - Fix the creation of spurious CODEC<->CODEC links which caused DAPM to
         have audio paths which shouldn't be present causing spurious powerups
         and potential audible issues for users.
       - Ensure the suspend->off transition doesn't have spurious transitions
         to prepare added to the sequence.
       - Fix incorrect skipping of PCM suspension for active audio streams.
       - Remove Timur Tabi from the CS4270 maintainers, Cirrus are now doing
         this and Timur no longer has the boards that he was using.
      927cdab3
    • Mark Brown's avatar
      cf86197e
    • Mark Brown's avatar