diff options
| author | Cássio Gabriel <cassiogabrielcontato@gmail.com> | 2026-03-25 02:24:04 -0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-03-28 10:55:35 +0100 |
| commit | 796e119e9b14763be905ad0d023c71a14bc2e931 (patch) | |
| tree | d1c15a09b2005b52504f43fb76b70ae236f79e26 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 16ee07bfa935f4f36deba896956f57d388221944 (diff) | |
ALSA: core: Validate compress device numbers without dynamic minors
Without CONFIG_SND_DYNAMIC_MINORS, ALSA reserves only two fixed minors
for compress devices on each card: comprD0 and comprD1.
snd_find_free_minor() currently computes the compress minor as
type + dev without validating dev first, so device numbers greater than
1 spill into the HWDEP minor range instead of failing registration.
ASoC passes rtd->id to snd_compress_new(), so this can happen on real
non-dynamic-minor builds.
Add a dedicated fixed-minor check for SNDRV_DEVICE_TYPE_COMPRESS in
snd_find_free_minor() and reject out-of-range device numbers with
-EINVAL before constructing the minor.
Also remove the stale TODO in compress_offload.c that still claims
multiple compress nodes are missing.
Fixes: 3eafc959b32f ("ALSA: core: add support for compressed devices")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260325-alsa-compress-static-minors-v1-1-0628573bee1c@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
