Re: [PATCH] staging: greybus: audio: split topology get into size and data calls
From: Dan Carpenter
Date: Tue Jun 30 2026 - 08:17:14 EST
On Tue, Jun 30, 2026 at 03:13:28PM +0300, Dan Carpenter wrote:
> On Mon, Jun 29, 2026 at 08:19:41PM +0530, adi25charis@xxxxxxxxx wrote:
> > + topology = kzalloc(size, GFP_KERNEL);
> > + if (!topology) {
> > + ret = -ENOMEM;
> > goto disable_connection;
> > }
> >
> > + ret = gb_audio_gb_get_topology(gbmodule->mgmt_connection, topology, size);
>
> It's unfortunate that we don't save the size anywhere. This code
> relies on trusting the firmware for its security. It would be better
> to move away from that.
>
(just ignore this comment. It's just random thoughts, not related to
your patch. Someone took some steps to try make this code less trusting
recently).
regards,
dan carpenter