Skip to content

Commit 637630c

Browse files
committed
firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling
JIRA: https://issues.redhat.com/browse/RHEL-102691 commit f1ed48e Author: Lorenzo Pieralisi <lpieralisi@kernel.org> Date: Wed, 8 Nov 2023 12:15:49 +0100 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. Fixes: 3522be4 ("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> Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
1 parent 0766af0 commit 637630c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firmware/arm_ffa/driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static void ffa_notification_info_get(void)
783783
if (ids_processed >= max_ids - 1)
784784
break;
785785

786-
part_id = packed_id_list[++ids_processed];
786+
part_id = packed_id_list[ids_processed++];
787787

788788
if (!ids_count[list]) { /* Global Notification */
789789
__do_sched_recv_cb(part_id, 0, false);
@@ -795,7 +795,7 @@ static void ffa_notification_info_get(void)
795795
if (ids_processed >= max_ids - 1)
796796
break;
797797

798-
vcpu_id = packed_id_list[++ids_processed];
798+
vcpu_id = packed_id_list[ids_processed++];
799799

800800
__do_sched_recv_cb(part_id, vcpu_id, true);
801801
}

0 commit comments

Comments
 (0)