1. 23 Jan, 2020 2 commits
    • Cezary Rojewski's avatar
      ASoC: Intel: skl_hda_dsp_common: Fix global-out-of-bounds bug · 15adb20f
      Cezary Rojewski authored
      Definitions for idisp snd_soc_dai_links within skl_hda_dsp_common are
      missing platform component. Add it to address following bug reported by
      KASAN:
      
      [   10.538502] BUG: KASAN: global-out-of-bounds in skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp]
      [   10.538509] Write of size 8 at addr ffffffffc0606840 by task systemd-udevd/299
      (...)
      [   10.538519] Call Trace:
      [   10.538524]  dump_stack+0x62/0x95
      [   10.538528]  print_address_description+0x2f5/0x3b0
      [   10.538532]  ? skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp]
      [   10.538535]  __kasan_report+0x134/0x191
      [   10.538538]  ? skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp]
      [   10.538542]  ? skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp]
      [   10.538544]  kasan_report+0x12/0x20
      [   10.538546]  __asan_store8+0x57/0x90
      [   10.538550]  skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp]
      [   10.538553]  platform_drv_probe+0x51/0xb0
      [   10.538556]  really_probe+0x311/0x600
      [   10.538559]  driver_probe_device+0x87/0x1b0
      [   10.538562]  device_driver_attach+0x8f/0xa0
      [   10.538565]  ? device_driver_attach+0xa0/0xa0
      [   10.538567]  __driver_attach+0x102/0x1a0
      [   10.538569]  ? device_driver_attach+0xa0/0xa0
      [   10.538572]  bus_for_each_dev+0xe8/0x160
      [   10.538574]  ? subsys_dev_iter_exit+0x10/0x10
      [   10.538577]  ? preempt_count_sub+0x18/0xc0
      [   10.538580]  ? _raw_write_unlock+0x1f/0x40
      [   10.538582]  driver_attach+0x2b/0x30
      [   10.538585]  bus_add_driver+0x251/0x340
      [   10.538588]  driver_register+0xd3/0x1c0
      [   10.538590]  __platform_driver_register+0x6c/0x80
      [   10.538592]  ? 0xffffffffc03e8000
      [   10.538595]  skl_hda_audio_init+0x1c/0x1000 [snd_soc_skl_hda_dsp]
      [   10.538598]  do_one_initcall+0xd0/0x36a
      [   10.538600]  ? trace_event_raw_event_initcall_finish+0x160/0x160
      [   10.538602]  ? kasan_unpoison_shadow+0x36/0x50
      [   10.538605]  ? __kasan_kmalloc+0xcc/0xe0
      [   10.538607]  ? kasan_unpoison_shadow+0x36/0x50
      [   10.538609]  ? kasan_poison_shadow+0x2f/0x40
      [   10.538612]  ? __asan_register_globals+0x65/0x80
      [   10.538615]  do_init_module+0xf9/0x36f
      [   10.538619]  load_module+0x398e/0x4590
      [   10.538625]  ? module_frob_arch_sections+0x20/0x20
      [   10.538628]  ? __kasan_check_write+0x14/0x20
      [   10.538630]  ? kernel_read+0x9a/0xc0
      [   10.538632]  ? __kasan_check_write+0x14/0x20
      [   10.538634]  ? kernel_read_file+0x1d3/0x3c0
      [   10.538638]  ? cap_capable+0xca/0x110
      [   10.538642]  __do_sys_finit_module+0x190/0x1d0
      [   10.538644]  ? __do_sys_finit_module+0x190/0x1d0
      [   10.538646]  ? __x64_sys_init_module+0x50/0x50
      [   10.538649]  ? expand_files+0x380/0x380
      [   10.538652]  ? __kasan_check_write+0x14/0x20
      [   10.538654]  ? fput_many+0x20/0xc0
      [   10.538658]  __x64_sys_finit_module+0x43/0x50
      [   10.538660]  do_syscall_64+0xce/0x700
      [   10.538662]  ? syscall_return_slowpath+0x230/0x230
      [   10.538665]  ? __do_page_fault+0x51e/0x640
      [   10.538668]  ? __kasan_check_read+0x11/0x20
      [   10.538670]  ? prepare_exit_to_usermode+0xc7/0x200
      [   10.538673]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: a78959f4 ("ASoC: Intel: skl_hda_dsp_common: use modern dai_link style")
      Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
      Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Link: https://lore.kernel.org/r/20200122181254.22801-1-cezary.rojewski@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      15adb20f
    • Charles Keepax's avatar
      ASoC: madera: Correct DMIC only input hook ups · ca34fa86
      Charles Keepax authored
      Both the data and clock should be connected to both the left and right
      inputs for DMIC only inputs, add the missing routes.
      Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/20200122104143.16725-1-ckeepax@opensource.cirrus.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      ca34fa86
  2. 21 Jan, 2020 2 commits
  3. 17 Jan, 2020 3 commits
  4. 13 Jan, 2020 8 commits
  5. 10 Jan, 2020 1 commit
  6. 09 Jan, 2020 1 commit
    • Olivier Moysan's avatar
      ASoC: stm32: sai: fix possible circular locking · a14bf98c
      Olivier Moysan authored
      In current driver, locks can be taken as follows:
      - Register access: take a lock on regmap config and then on clock.
      - Master clock provider: take a lock on clock and then on regmap config.
      This can lead to the circular locking summarized below.
      
      Remove peripheral clock management through regmap framework, and manage
      peripheral clock in driver instead. On register access, lock on clock
      is taken first, which allows to avoid possible locking issue.
      
      [ 6696.561513] ======================================================
      [ 6696.567670] WARNING: possible circular locking dependency detected
      [ 6696.573842] 4.19.49 #866 Not tainted
      [ 6696.577397] ------------------------------------------------------
      [ 6696.583566] pulseaudio/6439 is trying to acquire lock:
      [ 6696.588697] 87b0a25b (enable_lock){..-.}, at: clk_enable_lock+0x64/0x128
      [ 6696.595377]
      [ 6696.595377] but task is already holding lock:
      [ 6696.601197] d858f825 (stm32_sai_sub:1342:(sai->regmap_config)->lock){....}
      ...
      [ 6696.812513]  Possible unsafe locking scenario:
      [ 6696.812513]
      [ 6696.818418]        CPU0                    CPU1
      [ 6696.822935]        ----                    ----
      [ 6696.827451]   lock(stm32_sai_sub:1342:(sai->regmap_config)->lock);
      [ 6696.833618]                                lock(enable_lock);
      [ 6696.839350]                                lock(stm32_sai_sub:1342:
                                                    (sai->regmap_config)->lock);
      [ 6696.848035]   lock(enable_lock);
      
      Fixes: 03e78a24 ("ASoC: stm32: sai: add h7 support")
      Signed-off-by: default avatarOlivier Moysan <olivier.moysan@st.com>
      Link: https://lore.kernel.org/r/20200109083254.478-1-olivier.moysan@st.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      a14bf98c
  7. 07 Jan, 2020 1 commit
  8. 06 Jan, 2020 2 commits
  9. 03 Jan, 2020 1 commit
  10. 24 Dec, 2019 9 commits
  11. 18 Dec, 2019 2 commits
  12. 16 Dec, 2019 1 commit
  13. 10 Dec, 2019 7 commits