[PATCH] firmware: arm_ffa: Set handle field to zero in memory descriptor

Balint Dobszay balint.dobszay at arm.com
Thu Jun 1 07:07:49 PDT 2023


As described in commit 111a833dc5cb ("firmware: arm_ffa: Set reserved/MBZ
fields to zero in the memory descriptors") some fields in the memory
descriptor have to be zeroed explicitly. The handle field is one of these,
but it was left out from the commit, fix this now.

Fixes: 111a833dc5cb ("firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors")
Reported-by: Imre Kis <imre.kis at arm.com>
Signed-off-by: Balint Dobszay <balint.dobszay at arm.com>
---
 drivers/firmware/arm_ffa/driver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index e23409138667..2109cd178ff7 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -424,6 +424,7 @@ ffa_setup_and_transmit(u32 func_id, void *buffer, u32 max_fragsize,
 		ep_mem_access->flag = 0;
 		ep_mem_access->reserved = 0;
 	}
+	mem_region->handle = 0;
 	mem_region->reserved_0 = 0;
 	mem_region->reserved_1 = 0;
 	mem_region->ep_count = args->nattrs;
-- 
2.34.1




More information about the linux-arm-kernel mailing list