Linux Sound subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sreeraj S Kurup" <sreekuttan2156239@gmail.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: compress: Fix task resource leak on copy_to_user() failure
Date: Fri, 13 Nov 2026 10:55:03 +0000	[thread overview]
Message-ID: <sashiko-outbox-212644@kernel.org> (raw)
In-Reply-To: <20261113104518.3951-1-sreekuttan2156239@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ALSA: compress: missing Fixes trailer for task resource leak fix
--

commit f84b819c6c323f37e0be05907b075a949d352ae1
Author: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

> ALSA: compress: Fix task resource leak on copy_to_user() failure
>
> The task creation path allocates resources and installs file descriptors
> before copying the task information back to userspace.
>
> If copy_to_user() fails, the function returns -EFAULT without releasing
> the allocated task, DMA-BUF references, or file descriptors. This
> leaves the task registered and leaks resources.
>
> Delay fd_install() until copy_to_user() succeeds. If the copy fails,
> release the reserved file descriptors and their DMA-BUF references,
> then free the task using snd_compr_task_free_one().
>
> This ensures that task resources are properly released when copying
> task information to userspace fails.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

[Severity: Low]
This fixes a resource leak in the task creation path introduced by commit
04177158cf98 ("ALSA: compress_offload: introduce accel operation mode").
Should this include:

  Fixes: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261113104518.3951-1-sreekuttan2156239@gmail.com?part=1

      reply	other threads:[~2026-11-13 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 10:45 [PATCH] ALSA: compress: Fix task resource leak on copy_to_user() failure Sreeraj S Kurup
2026-11-13 10:55 ` sashiko-bot [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=sashiko-outbox-212644@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sreekuttan2156239@gmail.com \
    /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