Skip to content

Commit 9fda364

Browse files
Haoxiang Lisudeep-holla
authored andcommitted
firmware: arm_ffa: Unmap Rx/Tx buffers on init failure
ffa_init() maps the Rx/Tx buffers via ffa_rxtx_map() but on the partition setup failure path it never unmaps them. Add the missing ffa_rxtx_unmap() call in the error path so that the Rx/Tx buffers are properly released before freeing the backing pages. Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Message-Id: <20251210031656.56194-1-lihaoxiang@isrc.iscas.ac.cn> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
1 parent 8f0b4cc commit 9fda364

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/firmware/arm_ffa/driver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,7 @@ static int __init ffa_init(void)
20682068

20692069
pr_err("failed to setup partitions\n");
20702070
ffa_notifications_cleanup();
2071+
ffa_rxtx_unmap(drv_info->vm_id);
20712072
free_pages:
20722073
if (drv_info->tx_buffer)
20732074
free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);

0 commit comments

Comments
 (0)