1. 16 Apr, 2021 1 commit
    • Takashi Iwai's avatar
      ALSA: control: Fix racy management of user ctl memory size account · 998f26f4
      Takashi Iwai authored
      We've got a report about the possible race in the user control element
      counts (card->user_ctl_count), and it was confirmed that the race
      wasn't serious in the old code up to 5.12.  There, the value
      modification itself was exclusive and protected via a write semaphore,
      hence it's at most concurrent reads and evaluations before the
      increment.  Since it's only about the soft-limit to avoid the
      exhausting memory usage, one-off isn't a big problem at all.
      
      Meanwhile, the relevant code has been largely modified recently, and
      now card->user_ctl_count was replaced with card->user_ctl_alloc_size,
      and a few more places were added to access this field.  And, in this
      new code, it turned out to be more serious: the modifications are
      scattered in various places, and a few of them are without protection.
      It implies that it may lead to an inconsistent value by racy
      accesses.
      
      For addressing it, this patch extends the range covered by the
      card->controls_rwsem write lock at snd_ctl_elem_add() so that the all
      code paths that modify and refer to card->user_ctl_alloc_size are
      protected by the rwsem properly.
      
      The patch adds also comments in a couple of functions to indicate that
      they are under the rwsem lock.
      
      Fixes: 66c6d1ef ("ALSA: control: Add memory consumption limit to user controls")
      Link: https://lore.kernel.org/r/FEEBF384-44BE-42CF-8FB3-93470933F64F@purdue.edu
      Link: https://lore.kernel.org/r/20210415131856.13113-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      998f26f4
  2. 14 Apr, 2021 2 commits
  3. 13 Apr, 2021 1 commit
  4. 12 Apr, 2021 1 commit
  5. 10 Apr, 2021 1 commit
  6. 09 Apr, 2021 4 commits
  7. 08 Apr, 2021 2 commits
  8. 07 Apr, 2021 4 commits
  9. 06 Apr, 2021 2 commits
  10. 02 Apr, 2021 1 commit
  11. 01 Apr, 2021 5 commits
  12. 31 Mar, 2021 1 commit
    • Bastian Germann's avatar
      ASoC: sunxi: sun4i-codec: fill ASoC card owner · 7c0d6e48
      Bastian Germann authored
      card->owner is a required property and since commit 81033c6b ("ALSA:
      core: Warn on empty module") a warning is issued if it is empty. Add it.
      This fixes following warning observed on Lamobo R1:
      
      WARNING: CPU: 1 PID: 190 at sound/core/init.c:207 snd_card_new+0x430/0x480 [snd]
      Modules linked in: sun4i_codec(E+) sun4i_backend(E+) snd_soc_core(E) ...
      CPU: 1 PID: 190 Comm: systemd-udevd Tainted: G         C  E     5.10.0-1-armmp #1 Debian 5.10.4-1
      Hardware name: Allwinner sun7i (A20) Family
      Call trace:
       (snd_card_new [snd])
       (snd_soc_bind_card [snd_soc_core])
       (snd_soc_register_card [snd_soc_core])
       (sun4i_codec_probe [sun4i_codec])
      
      Fixes: 45fb6b6f ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs")
      Related: commit 3c27ea23 ("ASoC: qcom: Set card->owner to avoid warnings")
      Related: commit ec653df2 ("drm/vc4/vc4_hdmi: fill ASoC card owner")
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: alsa-devel@alsa-project.org
      Signed-off-by: default avatarBastian Germann <bage@linutronix.de>
      Link: https://lore.kernel.org/r/20210331151843.30583-1-bage@linutronix.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      7c0d6e48
  13. 30 Mar, 2021 11 commits
  14. 29 Mar, 2021 2 commits
  15. 28 Mar, 2021 2 commits
    • Linus Torvalds's avatar
      Linux 5.12-rc5 · a5e13c6d
      Linus Torvalds authored
      a5e13c6d
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.12-2020-03-28' of... · f9e2bb42
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.12-2020-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tooling fixes from Arnaldo Carvalho de Melo:
      
       - Avoid write of uninitialized memory when generating PERF_RECORD_MMAP*
         records.
      
       - Fix 'perf top' BPF support related crash with perf_event_paranoid=3 +
         kptr_restrict.
      
       - Validate raw event with sysfs exported format bits.
      
       - Fix waipid on SIGCHLD delivery bugs in 'perf daemon'.
      
       - Change to use bash for daemon test on Debian, where the default is
         dash and thus fails for use of bashisms in this test.
      
       - Fix memory leak in vDSO found using ASAN.
      
       - Remove now useless (due to the fact that BPF now supports static
         vars) failing sub test "BPF relocation checker".
      
       - Fix auxtrace queue conflict.
      
       - Sync linux/kvm.h with the kernel sources.
      
      * tag 'perf-tools-fixes-for-v5.12-2020-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf test: Change to use bash for daemon test
        perf record: Fix memory leak in vDSO found using ASAN
        perf test: Remove now useless failing sub test "BPF relocation checker"
        perf daemon: Return from kill functions
        perf daemon: Force waipid for all session on SIGCHLD delivery
        perf top: Fix BPF support related crash with perf_event_paranoid=3 + kptr_restrict
        perf pmu: Validate raw event with sysfs exported format bits
        perf synthetic events: Avoid write of uninitialized memory when generating PERF_RECORD_MMAP* records
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        perf synthetic-events: Fix uninitialized 'kernel_thread' variable
        perf auxtrace: Fix auxtrace queue conflict
      f9e2bb42