Skip to content

Commit caf0d8e

Browse files
committed
firmware: arm_ffa: Skip Rx buffer ownership release if not acquired
JIRA: https://issues.redhat.com/browse/RHEL-102691 commit 4567bda Author: Sudeep Holla <[email protected]> Date: Fri, 21 Mar 2025 11:57:00 +0000 Completion of the FFA_PARTITION_INFO_GET ABI transfers the ownership of the caller’s Rx buffer from the producer(typically partition mnager) to the consumer(this driver/OS). FFA_RX_RELEASE transfers the ownership from the consumer back to the producer. However, when we set the flag to just return the count of partitions deployed in the system corresponding to the specified UUID while invoking FFA_PARTITION_INFO_GET, the Rx buffer ownership shouldn't be transferred to this driver. We must be able to skip transferring back the ownership to the partition manager when we request just to get the count of the partitions as the buffers are not acquired in this case. Firmware may return FFA_RET_DENIED or other error for the ffa_rx_release() in such cases. Fixes: bb1be74 ("firmware: arm_ffa: Add v1.1 get_partition_info support") Message-Id: <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Marcin Juszkiewicz <[email protected]>
1 parent d708952 commit caf0d8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/firmware/arm_ffa/driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ __ffa_partition_info_get(u32 uuid0, u32 uuid1, u32 uuid2, u32 uuid3,
299299
import_uuid(&buf->uuid, (u8 *)&rx_buf->uuid);
300300
}
301301

302-
ffa_rx_release();
302+
if (!(flags & PARTITION_INFO_GET_RETURN_COUNT_ONLY))
303+
ffa_rx_release();
303304

304305
mutex_unlock(&drv_info->rx_lock);
305306

0 commit comments

Comments
 (0)