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>,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
notify@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: compress: Fix task creation error unwind
Date: Wed, 17 Jun 2026 11:04:25 +0200 [thread overview]
Message-ID: <87se6lpmg6.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260615-alsa-compress-task-unwind-v1-1-39e8ad3ddb27@gmail.com>
On Mon, 15 Jun 2026 15:37:26 +0200,
Cássio Gabriel wrote:
>
> snd_compr_task_new() allocates the driver task before validating the
> returned DMA buffers and reserving file descriptors. When either of
> those later steps fails, the core frees its task wrapper and DMA-buffer
> references without calling the driver's task_free() callback. Any
> driver resources allocated by task_create() are therefore leaked.
>
> The dual-fd allocation path also jumps to cleanup without storing the
> negative get_unused_fd_flags() result in retval. Since retval still
> contains the successful task_create() return value, TASK_CREATE can
> incorrectly report success although the task was discarded.
>
> Preserve the fd allocation errors and call task_free() when failure
> occurs after a successful task_create() callback.
>
> Fixes: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")
> Fixes: 3d3f43fab4cf ("ALSA: compress_offload: improve file descriptors installation for dma-buf")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-06-17 9:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 13:37 [PATCH] ALSA: compress: Fix task creation error unwind Cássio Gabriel
2026-06-17 9:04 ` 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=87se6lpmg6.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=cassiogabrielcontato@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=notify@kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--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