Re: [PATCH v10 19/19] dmaengine: ti: k3-udma: Validate resource ID and fix logging in reservation

From: Vignesh Raghavendra

Date: Mon Sep 28 2026 - 04:53:15 EST


On Mon, 28 Sep 2026 08:26:25 +0530, Sai Sree Kartheek Adivi <s-adivi@xxxxxx> wrote:
> The `__udma_reserve_##res` macro currently lacks a bounds check for
> the provided `id`. If a caller passes an ID exceeding the resource
> count (`ud->res##_cnt`), `test_bit()` performs an out-of-bounds
> memory access on the bitmap.
>
> Additionally, the macro returns `-ENOENT` when a resource is already
> in use, which is semantically incorrect. The logging logic is also
> broken, printing the literal "res##<id>" instead of the resource
> name.
>
> [...]

Reviewed-by: Vignesh Raghavendra <vigneshr@xxxxxx>

--
Vignesh