UPSTREAM: firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling

To parse the retrieved ID lists appropriately in
ffa_notification_info_get() the ids_processed variable should not
be pre-incremented - we are dropping an identifier at the
beginning of the list.

Fix it by using the post-increment operator to increment the number
of processed IDs.

Bug: 254441685
Fixes: 3522be48d8 ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20231108111549.155974-1-lpieralisi@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
(cherry picked from commit f1ed48ef97)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I72db23e016d87c76119edcb7eb7a964ee14927db
This commit is contained in:
Lorenzo Pieralisi 2023-11-08 12:15:49 +01:00 committed by Lee Jones
parent 7c593903ee
commit a44df1cfbb

View File

@ -782,7 +782,7 @@ static void ffa_notification_info_get(void)
if (ids_processed >= max_ids - 1)
break;
part_id = packed_id_list[++ids_processed];
part_id = packed_id_list[ids_processed++];
if (!ids_count[list]) { /* Global Notification */
__do_sched_recv_cb(part_id, 0, false);
@ -794,7 +794,7 @@ static void ffa_notification_info_get(void)
if (ids_processed >= max_ids - 1)
break;
vcpu_id = packed_id_list[++ids_processed];
vcpu_id = packed_id_list[ids_processed++];
__do_sched_recv_cb(part_id, vcpu_id, true);
}