1. 04 Jul, 2016 1 commit
    • Takashi Iwai's avatar
      ALSA: timer: Fix negative queue usage by racy accesses · 3fa6993f
      Takashi Iwai authored
      The user timer tu->qused counter may go to a negative value when
      multiple concurrent reads are performed since both the check and the
      decrement of tu->qused are done in two individual locked contexts.
      This results in bogus read outs, and the endless loop in the
      user-space side.
      
      The fix is to move the decrement of the tu->qused counter into the
      same spinlock context as the zero-check of the counter.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3fa6993f
  2. 02 Jul, 2016 1 commit
  3. 01 Jul, 2016 5 commits
  4. 29 Jun, 2016 3 commits
    • Alexander Shiyan's avatar
      ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode · 4f14f5c1
      Alexander Shiyan authored
      The i.MX51 datasheet says:
      Chapter 56.1.2.4 I2S Mode
      ...
      When I2S modes are entered (I2S master (01) or I2S slave (10)),
      the following settings are recommended:
      ...
      - TX Frame Rate should be 2 i.e. (STCCR[12:8] = 1)
      - RX Frame Rate should be 2 i.e. (SRCCR[12:8] = 1)
      
      Chapter 56.3.3.12 SSI Transmit and Receive Clock Control Registers (STCCR & SRCCR)
      ...
      Bits 12-8 DC4-DC0
      Frame Rate Divider Control. These bits are used to control the divide ratio
      for the programmable frame rate dividers. The divide ratio works on the word
      clock. In Normal mode, this ratio determines the word transfer rate.
      In Network mode, this ratio sets the number of words per frame. The divide
      ratio ranges from 1 to 32 in Normal mode and from 2 to 32 in Network mode.
      In Normal mode, a divide ratio of 1 (DC=00000) provides continuous periodic
      data word transfer. A bit-length frame sync must be used in this case.
      
      Function fsl_ssi_hw_params() setup Normal mode for MONO output,
      so with DC=0, SSI enters to continuous periodic data word transfer.
      To fix this, setup DC for any I2S mode.
      Patch has tested on custom board based on Digi CCMX-51 module (i.MX51).
      Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      4f14f5c1
    • Takashi Iwai's avatar
      ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift() · 62db7152
      Takashi Iwai authored
      vortex_wtdma_bufshift() function does calculate the page index
      wrongly, first masking then shift, which always results in zero.
      The proper computation is to first shift, then mask.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      62db7152
    • Vinod Koul's avatar
      ALSA: hda - Add PCI ID for Kabylake-H · 6858107e
      Vinod Koul authored
      Kabylake-H shows up as PCI ID 0xa2f0. We missed adding this
      earlier with other KBL IDs.
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6858107e
  5. 27 Jun, 2016 2 commits
  6. 26 Jun, 2016 3 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 2ac9b973
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two straightforward fixes.
      
        One is a concurrency issue only affecting SAS connected SATA drives,
        but which could hang the storage subsystem if it triggers (because the
        outstanding command count on error never goes back to zero) and the
        other is a NO_TAG fallout from the switch to hostwide tags which
        causes the system to crash on module insertion (we've checked
        carefully and only the 53c700 family of drivers is vulnerable to this
        issue)"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        53c700: fix BUG on untagged commands
        scsi: fix race between simultaneous decrements of ->host_failed
      2ac9b973
    • Alan Cox's avatar
      ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute · 18f58399
      Alan Cox authored
      Now we correctly error an attempt to execute an unsupported operation.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      18f58399
    • Bob Copeland's avatar
      ALSA: hda - fix read before array start · 81e43960
      Bob Copeland authored
      UBSAN reports the following warning from accessing path->path[-1]
      in set_path_power():
      
      [   16.078040] ================================================================================
      [   16.078124] UBSAN: Undefined behaviour in sound/pci/hda/hda_generic.c:3981:17
      [   16.078198] index -1 is out of range for type 'hda_nid_t [10]'
      [   16.078270] CPU: 2 PID: 1738 Comm: modprobe Not tainted 4.7.0-rc1-wt+ #47
      [   16.078274] Hardware name: LENOVO 3443CTO/3443CTO, BIOS G6ET23WW (1.02 ) 08/14/2012
      [   16.078278]  ffff8800cb246000 ffff8800cb3638b8 ffffffff815c4fe3 0000000000000032
      [   16.078286]  ffff8800cb3638e0 ffffffffffffffff ffff8800cb3638d0 ffffffff8162443d
      [   16.078294]  ffffffffa0894200 ffff8800cb363920 ffffffff81624af7 0000000000000292
      [   16.078302] Call Trace:
      [   16.078311]  [<ffffffff815c4fe3>] dump_stack+0x86/0xd3
      [   16.078317]  [<ffffffff8162443d>] ubsan_epilogue+0xd/0x40
      [   16.078324]  [<ffffffff81624af7>] __ubsan_handle_out_of_bounds+0x67/0x70
      [   16.078335]  [<ffffffffa087665f>] set_path_power+0x1bf/0x230 [snd_hda_codec_generic]
      [   16.078344]  [<ffffffffa087880d>] add_pin_power_ctls+0x8d/0xc0 [snd_hda_codec_generic]
      [   16.078352]  [<ffffffffa087f190>] ? pin_power_down_callback+0x20/0x20 [snd_hda_codec_generic]
      [   16.078360]  [<ffffffffa0878947>] add_all_pin_power_ctls+0x107/0x150 [snd_hda_codec_generic]
      [   16.078370]  [<ffffffffa08842b3>] snd_hda_gen_parse_auto_config+0x2d73/0x49e0 [snd_hda_codec_generic]
      [   16.078376]  [<ffffffff81173360>] ? trace_hardirqs_on_caller+0x1b0/0x2c0
      [   16.078390]  [<ffffffffa089df27>] alc_parse_auto_config+0x147/0x310 [snd_hda_codec_realtek]
      [   16.078402]  [<ffffffffa08a332a>] patch_alc269+0x23a/0x560 [snd_hda_codec_realtek]
      [   16.078417]  [<ffffffffa0838644>] hda_codec_driver_probe+0xa4/0x1a0 [snd_hda_codec]
      [   16.078424]  [<ffffffff817bbac1>] driver_probe_device+0x101/0x380
      [   16.078430]  [<ffffffff817bbdf9>] __driver_attach+0xb9/0x100
      [   16.078438]  [<ffffffff817bbd40>] ? driver_probe_device+0x380/0x380
      [   16.078444]  [<ffffffff817b8d20>] bus_for_each_dev+0x70/0xc0
      [   16.078449]  [<ffffffff817bb087>] driver_attach+0x27/0x50
      [   16.078454]  [<ffffffff817ba956>] bus_add_driver+0x166/0x2c0
      [   16.078460]  [<ffffffffa0369000>] ? 0xffffffffa0369000
      [   16.078465]  [<ffffffff817bd13d>] driver_register+0x7d/0x130
      [   16.078477]  [<ffffffffa083816f>] __hda_codec_driver_register+0x6f/0x90 [snd_hda_codec]
      [   16.078488]  [<ffffffffa036901e>] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek]
      [   16.078493]  [<ffffffff8100215e>] do_one_initcall+0x4e/0x1d0
      [   16.078499]  [<ffffffff8119f54d>] ? rcu_read_lock_sched_held+0x6d/0x80
      [   16.078504]  [<ffffffff813701b1>] ? kmem_cache_alloc_trace+0x391/0x560
      [   16.078510]  [<ffffffff812bb314>] ? do_init_module+0x28/0x273
      [   16.078515]  [<ffffffff812bb387>] do_init_module+0x9b/0x273
      [   16.078522]  [<ffffffff811e3782>] load_module+0x20b2/0x3410
      [   16.078527]  [<ffffffff811df140>] ? m_show+0x210/0x210
      [   16.078533]  [<ffffffff813b2b26>] ? kernel_read+0x66/0xe0
      [   16.078541]  [<ffffffff811e4cfa>] SYSC_finit_module+0xba/0xc0
      [   16.078547]  [<ffffffff811e4d1e>] SyS_finit_module+0xe/0x10
      [   16.078552]  [<ffffffff81a860fc>] entry_SYSCALL_64_fastpath+0x1f/0xbd
      [   16.078556] ================================================================================
      
      Fix by checking path->depth before use.
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      81e43960
  7. 25 Jun, 2016 25 commits