1. 23 Oct, 2015 6 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 2c44f4f0
      Linus Torvalds authored
      Pull KVM bugfixes from Paolo Bonzini:
       "Bug fixes for ARM, mostly 4.3 regressions related to virtual interrupt
        controller changes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        arm/arm64: KVM: Fix disabled distributor operation
        arm/arm64: KVM: Clear map->active on pend/active clear
        arm/arm64: KVM: Fix arch timer behavior for disabled interrupts
        KVM: arm: use GIC support unconditionally
        KVM: arm/arm64: Fix memory leak if timer initialization fails
        KVM: arm/arm64: Do not inject spurious interrupts
      2c44f4f0
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v4.3-rc6' of... · 8a990fb4
      Linus Torvalds authored
      Merge tag 'trace-fixes-v4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fixes from Steven Rostedt:
       "Running tests on other changes, the system locked up due to lots of
        warnings.  It was caused by the stack tracer triggering a warning
        about using rcu_dereference() when RCU was not watching.  This can
        happen due to the fact that the stack tracer uses the function tracer
        to check each function, and there are functions that may be called and
        traced when RCU stopped watching.  Namely when a function is called
        just before going idle or to userspace and after RCU stopped watching
        that current CPU.
      
        The first patch makes sure that RCU is watching when the stack tracer
        uses RCU.  The second patch is to make sure that the stack tracer does
        not get called by functions in NMI, as it's not NMI safe"
      
      * tag 'trace-fixes-v4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Do not allow stack_tracer to record stack in NMI
        tracing: Have stack tracer force RCU to be watching
      8a990fb4
    • Linus Torvalds's avatar
      Merge tag 'sound-4.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 0122835a
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "There is nothing to worry you much, only a few small & stable patches
        are found for usual stuff, HD-audio (a Lenovo laptop quirk, a fix for
        minor error handling) and ASoC (trivial fixes for RT298 and WM
        codecs).
      
        The only remaining major change is the fix for ASoC SX_TLV control
        that was overseen during refactoring, but the fix itself is trivial
        and safe"
      
      * tag 'sound-4.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: wm8962: mark cache_dirty flag after software reset in pm_resume
        ASoC: rt298: fix wrong setting of gpio2_en
        ASoC: wm8904: Correct number of EQ registers
        ALSA: hda - Fix deadlock at error in building PCM
        ASoC: Add info callback for SX_TLV controls
        ASoC: rt298: correct index default value
        ALSA: hda - Fix inverted internal mic on Lenovo G50-80
        ALSA: hdac: Explicitly add io.h
      0122835a
    • Linus Torvalds's avatar
      Merge tag 'media/v4.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 45d80f16
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "Some regression fixes and potential security issues:
      
         - netup_unidvb: fix potential crash when spi is NULL
         - rtl28xxu: fix control message flaws
         - m88ds3103: fix a regression on Kernel 4.2
         - c8sectpfe: fix some issues on this new driver
         - v4l2-flash-led-class: fix a Kbuild dependency
         - si2157 and si2158: check for array boundary when uploading firmware
           files
         - horus3a and lnbh25: fix some building troubles when some options
           aren't selected
         - ir-hix5hd2: drop the use of IRQF_NO_SUSPEND"
      
      * tag 'media/v4.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] m88ds3103: use own reg update_bits() implementation
        [media] rtl28xxu: fix control message flaws
        [media] v4l2-flash-led-class: Add missing VIDEO_V4L2 Kconfig dependency
        [media] netup_unidvb: fix potential crash when spi is NULL
        [media] si2168: Bounds check firmware
        [media] si2157: Bounds check firmware
        [media] ir-hix5hd2: drop the use of IRQF_NO_SUSPEND
        [media] c8sectpfe: fix return of garbage
        [media] c8sectpfe: fix ininitialized error return on firmware load failure
        [media] lnbh25: Fix lnbh25_attach() function return type
        [media] horus3a: Fix horus3a_attach() function parameters
      45d80f16
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · a67b20d2
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "I've been a bit slow gathering these:
      
         - drm/mst: one mutex leak in a fail path
      
         - radeon: two oops fixes, one dpm fix
      
         - i915: one messy set of fixes, where we revert the original fix, and
                 pull back the proper set of fixes from -next on top.
      
         - nouveau: one fix for an illegal buffer placement.
      
        Doesn't look too bad, hopefully shouldn't be too much more"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau/gem: return only valid domain when there's only one
        drm: fix mutex leak in drm_dp_get_mst_branch_device
        drm/amdgpu: add missing dpm check for KV dpm late init
        drm/amdgpu/dpm: don't add pwm attributes if DPM is disabled
        drm/radeon/dpm: don't add pwm attributes if DPM is disabled
        drm/i915: Add primary plane to mask if it's visible
        drm/i915: Move sprite/cursor plane disable to intel_sanitize_crtc()
        drm/i915: Assign hwmode after encoder state readout
        Revert "drm/i915: Add primary plane to mask if it's visible"
        drm/i915: Deny wrapping an userptr into a framebuffer
        drm/i915: Enable DPLL VGA mode before P1/P2 divider write
        drm/i915: Restore lost DPLL register write on gen2-4
        drm/i915: Flush pipecontrol post-sync writes
        drm/i915: Fix kerneldoc for i915_gem_shrink_all
      a67b20d2
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v4.3-rc6' of... · b9b6e4ac
      Takashi Iwai authored
      Merge tag 'asoc-fix-v4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v4.3
      
      A bunch of driver fixes plus one core fix which fixes problems with
      misreporting values from _SX controls following a recent refactoring.
      This had gone unnoticed as such controls are quite rare.
      b9b6e4ac
  2. 22 Oct, 2015 16 commits
  3. 21 Oct, 2015 9 commits
  4. 20 Oct, 2015 9 commits
    • Christoffer Dall's avatar
      arm/arm64: KVM: Fix disabled distributor operation · 0d997491
      Christoffer Dall authored
      We currently do a single update of the vgic state when the distributor
      enable/disable control register is accessed and then bypass updating the
      state for as long as the distributor remains disabled.
      
      This is incorrect, because updating the state does not consider the
      distributor enable bit, and this you can end up in a situation where an
      interrupt is marked as pending on the CPU interface, but not pending on
      the distributor, which is an impossible state to be in, and triggers a
      warning.  Consider for example the following sequence of events:
      
      1. An interrupt is marked as pending on the distributor
         - the interrupt is also forwarded to the CPU interface
      2. The guest turns off the distributor (it's about to do a reboot)
         - we stop updating the CPU interface state from now on
      3. The guest disables the pending interrupt
         - we remove the pending state from the distributor, but don't touch
           the CPU interface, see point 2.
      
      Since the distributor disable bit really means that no interrupts should
      be forwarded to the CPU interface, we modify the code to keep updating
      the internal VGIC state, but always set the CPU interface pending bits
      to zero when the distributor is disabled.
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      0d997491
    • Christoffer Dall's avatar
      arm/arm64: KVM: Clear map->active on pend/active clear · 544c572e
      Christoffer Dall authored
      When a guest reboots or offlines/onlines CPUs, it is not uncommon for it
      to clear the pending and active states of an interrupt through the
      emulated VGIC distributor.  However, since the architected timers are
      defined by the architecture to be level triggered and the guest
      rightfully expects them to be that, but we emulate them as
      edge-triggered, we have to mimic level-triggered behavior for an
      edge-triggered virtual implementation.
      
      We currently do not signal the VGIC when the map->active field is true,
      because it indicates that the guest has already been signalled of the
      interrupt as required.  Normally this field is set to false when the
      guest deactivates the virtual interrupt through the sync path.
      
      We also need to catch the case where the guest deactivates the interrupt
      through the emulated distributor, again allowing guests to boot even if
      the original virtual timer signal hit before the guest's GIC
      initialization sequence is run.
      Reviewed-by: default avatarEric Auger <eric.auger@linaro.org>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      544c572e
    • Christoffer Dall's avatar
      arm/arm64: KVM: Fix arch timer behavior for disabled interrupts · cff9211e
      Christoffer Dall authored
      We have an interesting issue when the guest disables the timer interrupt
      on the VGIC, which happens when turning VCPUs off using PSCI, for
      example.
      
      The problem is that because the guest disables the virtual interrupt at
      the VGIC level, we never inject interrupts to the guest and therefore
      never mark the interrupt as active on the physical distributor.  The
      host also never takes the timer interrupt (we only use the timer device
      to trigger a guest exit and everything else is done in software), so the
      interrupt does not become active through normal means.
      
      The result is that we keep entering the guest with a programmed timer
      that will always fire as soon as we context switch the hardware timer
      state and run the guest, preventing forward progress for the VCPU.
      
      Since the active state on the physical distributor is really part of the
      timer logic, it is the job of our virtual arch timer driver to manage
      this state.
      
      The timer->map->active boolean field indicates whether we have signalled
      this interrupt to the vgic and if that interrupt is still pending or
      active.  As long as that is the case, the hardware doesn't have to
      generate physical interrupts and therefore we mark the interrupt as
      active on the physical distributor.
      
      We also have to restore the pending state of an interrupt that was
      queued to an LR but was retired from the LR for some reason, while
      remaining pending in the LR.
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Reported-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      cff9211e
    • Arnd Bergmann's avatar
      KVM: arm: use GIC support unconditionally · 4a5d69b7
      Arnd Bergmann authored
      The vgic code on ARM is built for all configurations that enable KVM,
      but the parent_data field that it references is only present when
      CONFIG_IRQ_DOMAIN_HIERARCHY is set:
      
      virt/kvm/arm/vgic.c: In function 'kvm_vgic_map_phys_irq':
      virt/kvm/arm/vgic.c:1781:13: error: 'struct irq_data' has no member named 'parent_data'
      
      This flag is implied by the GIC driver, and indeed the VGIC code only
      makes sense if a GIC is present. This changes the CONFIG_KVM symbol
      to always select GIC, which avoids the issue.
      
      Fixes: 662d9715 ("arm/arm64: KVM: Kill CONFIG_KVM_ARM_{VGIC,TIMER}")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      4a5d69b7
    • Pavel Fedin's avatar
      KVM: arm/arm64: Fix memory leak if timer initialization fails · 399ea0f6
      Pavel Fedin authored
      Jump to correct label and free kvm_host_cpu_state
      Reviewed-by: default avatarWei Huang <wei@redhat.com>
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      399ea0f6
    • Pavel Fedin's avatar
      KVM: arm/arm64: Do not inject spurious interrupts · 437f9963
      Pavel Fedin authored
      When lowering a level-triggered line from userspace, we forgot to lower
      the pending bit on the emulated CPU interface and we also did not
      re-compute the pending_on_cpu bitmap for the CPU affected by the change.
      
      Update vgic_update_irq_pending() to fix the two issues above and also
      raise a warning in vgic_quue_irq_to_lr if we encounter an interrupt
      pending on a CPU which is neither marked active nor pending.
      
        [ Commit text reworked completely - Christoffer ]
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      437f9963
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Have stack tracer force RCU to be watching · a2d76290
      Steven Rostedt (Red Hat) authored
      The stack tracer was triggering the WARN_ON() in module.c:
      
       static void module_assert_mutex_or_preempt(void)
       {
       #ifdef CONFIG_LOCKDEP
      	if (unlikely(!debug_locks))
      		return;
      
      	WARN_ON(!rcu_read_lock_sched_held() &&
      		!lockdep_is_held(&module_mutex));
       #endif
       }
      
      The reason is that the stack tracer traces all function calls, and some of
      those calls happen while exiting or entering user space and idle. Some of
      these functions are called after RCU had already stopped watching, as RCU
      does not watch userspace or idle CPUs.
      
      If a max stack is hit, then the save_stack_trace() is called, which will
      check module addresses and call module_assert_mutex_or_preempt(), and then
      trigger the warning. Sad part is, the warning itself will also do a stack
      trace and tigger the same warning. That probably should be fixed.
      
      The warning was added by 0be964be "module: Sanitize RCU usage and
      locking" but this bug has probably been around longer. But it's unlikely to
      cause much harm, but the new warning causes the system to lock up.
      
      Cc: stable@vger.kernel.org # 4.2+
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc:"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a2d76290
    • Charles Keepax's avatar
      ASoC: wm8904: Correct number of EQ registers · 97aff2c0
      Charles Keepax authored
      There are 24 EQ registers not 25, I suspect this bug came about because
      the registers start at EQ1 not zero. The bug is relatively harmless as
      the extra register written is an unused one.
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      97aff2c0
    • Takashi Iwai's avatar
      ALSA: hda - Fix deadlock at error in building PCM · d289619a
      Takashi Iwai authored
      The HDA codec driver issues snd_hda_codec_reset() at the error path of
      PCM build.  This was needed in the earlier code base, but the recent
      rewrite to use the standard bus binding made this a deadlock:
       modprobe        D 0000000000000005     0   720    716 0x00000080
       Call Trace:
        [<ffffffff816a5dbe>] schedule+0x3e/0x90
        [<ffffffff816a61a5>] schedule_preempt_disabled+0x15/0x20
        [<ffffffff816a7ae5>] __mutex_lock_slowpath+0xb5/0x120
        [<ffffffff816a7b6b>] mutex_lock+0x1b/0x30
        [<ffffffff8148656b>] device_release_driver+0x1b/0x30
        [<ffffffff81485c15>] bus_remove_device+0x105/0x180
        [<ffffffff814822b9>] device_del+0x139/0x260
        [<ffffffffa05e0ec5>] snd_hdac_device_unregister+0x25/0x30 [snd_hda_core]
        [<ffffffffa074fa6a>] snd_hda_codec_reset+0x2a/0x70 [snd_hda_codec]
        [<ffffffffa075007b>] snd_hda_codec_build_pcms+0x18b/0x1b0 [snd_hda_codec]
        [<ffffffffa074a44e>] hda_codec_driver_probe+0xbe/0x140 [snd_hda_codec]
        [<ffffffff81486ac4>] driver_probe_device+0x1f4/0x460
        [<ffffffff81486dc0>] __driver_attach+0x90/0xa0
        [<ffffffff81484844>] bus_for_each_dev+0x64/0xa0
        [<ffffffff814862de>] driver_attach+0x1e/0x20
        [<ffffffff81485e7b>] bus_add_driver+0x1eb/0x280
        [<ffffffff81487680>] driver_register+0x60/0xe0
        [<ffffffffa074a0da>] __hda_codec_driver_register+0x5a/0x60 [snd_hda_codec]
        [<ffffffffa070a01e>] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek]
        [<ffffffff810002f3>] do_one_initcall+0xb3/0x200
        [<ffffffff816a1fc5>] do_init_module+0x60/0x1f8
        [<ffffffff810ee5c3>] load_module+0x1653/0x1bd0
        [<ffffffff810eed48>] SYSC_finit_module+0x98/0xc0
        [<ffffffff810eed8e>] SyS_finit_module+0xe/0x10
        [<ffffffff816aa032>] entry_SYSCALL_64_fastpath+0x16/0x75
      
      The simple fix is just to remove this call, since we don't need to
      think about unbinding at there any longer.
      
      Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=948758
      Cc: <stable@vger.kernel.org> # v4.1+
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d289619a