Commit 10c92d2
FROMLIST: misc: fastrpc: Fix initial memory allocation for Audio PD memory pool
The initial buffer allocated for the Audio PD memory pool is never added
to the pool because pageslen is set to 0. As a result, the buffer is not
registered with Audio PD and is never used, causing a memory leak. Audio
PD immediately falls back to allocating memory from the remote heap since
the pool starts out empty.
Fix this by setting pageslen to 1 so that the initially allocated buffer
is correctly registered and becomes part of the Audio PD memory pool.
Link: https://lore.kernel.org/all/20260407100508.1027-2-jianping.li@oss.qualcomm.com/
Fixes: 0871561 ("misc: fastrpc: Add support for audiopd")
Cc: stable@kernel.org
Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com>1 parent 2cea4c7 commit 10c92d2
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1423 | 1423 | | |
1424 | 1424 | | |
1425 | 1425 | | |
1426 | | - | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
1427 | 1429 | | |
1428 | 1430 | | |
1429 | 1431 | | |
| |||
1444 | 1446 | | |
1445 | 1447 | | |
1446 | 1448 | | |
| 1449 | + | |
1447 | 1450 | | |
1448 | 1451 | | |
1449 | 1452 | | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
| |||
0 commit comments