From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>, Takashi Iwai <tiwai@suse.com>,
Jaroslav Kysela <perex@perex.cz>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Omair Mohammed Abdullah <omair.m.abdullah@intel.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: core: Validate compress device numbers without dynamic minors
Date: Sat, 28 Mar 2026 10:59:19 +0100 [thread overview]
Message-ID: <87341kw9zc.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260325-alsa-compress-static-minors-v1-1-0628573bee1c@gmail.com>
On Wed, 25 Mar 2026 06:24:04 +0100,
Cássio Gabriel wrote:
>
> 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>
Applied to for-next branch now. Thanks.
Takashi
prev parent reply other threads:[~2026-03-28 9:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 5:24 [PATCH] ALSA: core: Validate compress device numbers without dynamic minors Cássio Gabriel
2026-03-28 9:59 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87341kw9zc.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cassiogabrielcontato@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=omair.m.abdullah@intel.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox