Re: [PATCH v2] ALSA: compress: Fix task resource leak on copy_to_user() failure

From: Takashi Iwai

Date: Tue Nov 17 2026 - 10:13:48 EST


On Tue, 17 Nov 2026 07:28:08 +0100,
Sreeraj S Kurup wrote:
>
> Hi Takashi,
>
> Thanks for reviewing my other patches.
>
> I noticed that this patch is still pending review.
> Could you please take a look when you get a chance?

I'm still considering whether it's safe. The open code in the error
path looks a bit scary.

Aren't dma_buf_put() called already in snd_compr_task_free() that is
called from snd_compr_task_free_one()?

Also, a bit concern is that we expose to user-space before actually
installing the file descriptor. I don't think there will be so much
race here, but just need to be sure...


thanks,

Takashi