Skip to content

Commit 419cf1f

Browse files
committed
FROMLIST: misc: fastrpc: Fix initial memory allocation for Audio PD memory pool
The initially allocated memory is not properly included in the pool, leading to potential issues with memory management. Set the number of pages to one to ensure that the initially allocated memory is correctly added to the Audio PD memory pool. Link: https://lore.kernel.org/all/20250513042825.2147985-4-ekansh.gupta@oss.qualcomm.com/ Fixes: 0871561 ("misc: fastrpc: Add support for audiopd") Cc: stable@kernel.org Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
1 parent 12ea159 commit 419cf1f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/misc/fastrpc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,9 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl,
13111311
goto err;
13121312
}
13131313

1314+
inbuf.client_id = fl->client_id;
1315+
inbuf.namelen = init.namelen;
1316+
inbuf.pageslen = 0;
13141317
if (!fl->cctx->audio_init_mem) {
13151318
err = fastrpc_remote_heap_alloc(fl, fl->sctx->dev, init.memlen,
13161319
&buf);
@@ -1335,12 +1338,10 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl,
13351338
list_add_tail(&buf->node, &fl->cctx->rhmaps);
13361339
spin_unlock_irqrestore(&fl->cctx->lock, flags);
13371340
fl->cctx->audio_init_mem = true;
1341+
inbuf.pageslen = 1;
13381342
}
13391343
}
13401344

1341-
inbuf.client_id = fl->client_id;
1342-
inbuf.namelen = init.namelen;
1343-
inbuf.pageslen = 0;
13441345
fl->pd = USER_PD;
13451346

13461347
args[0].ptr = (u64)(uintptr_t)&inbuf;

0 commit comments

Comments
 (0)