* [PATCH] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling
@ 2023-11-08 11:15 Lorenzo Pieralisi
2023-11-08 11:32 ` Sudeep Holla
2023-11-13 12:24 ` Sudeep Holla
0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2023-11-08 11:15 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: linux-kernel, Lorenzo Pieralisi, Sudeep Holla
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: 3522be48d82b ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface")
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/firmware/arm_ffa/driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 07b72c679247..ccf91a795c3d 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -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);
}
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling
2023-11-08 11:15 [PATCH] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling Lorenzo Pieralisi
@ 2023-11-08 11:32 ` Sudeep Holla
2023-11-13 12:24 ` Sudeep Holla
1 sibling, 0 replies; 3+ messages in thread
From: Sudeep Holla @ 2023-11-08 11:32 UTC (permalink / raw)
To: Lorenzo Pieralisi; +Cc: linux-arm-kernel, linux-kernel, Sudeep Holla
On Wed, Nov 08, 2023 at 12:15:49PM +0100, Lorenzo Pieralisi wrote:
> 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: 3522be48d82b ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface")
Thanks for spotting and fixing this. Much appreciated!
I will queue at -rc1.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling
2023-11-08 11:15 [PATCH] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling Lorenzo Pieralisi
2023-11-08 11:32 ` Sudeep Holla
@ 2023-11-13 12:24 ` Sudeep Holla
1 sibling, 0 replies; 3+ messages in thread
From: Sudeep Holla @ 2023-11-13 12:24 UTC (permalink / raw)
To: linux-arm-kernel, Lorenzo Pieralisi; +Cc: Sudeep Holla, linux-kernel
On Wed, 08 Nov 2023 12:15:49 +0100, Lorenzo Pieralisi wrote:
> 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.
>
> [...]
Applied to sudeep.holla/linux (for-next/ffa/fixes), thanks!
[1/1] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling
https://git.kernel.org/sudeep.holla/c/f1ed48ef97e2
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-13 12:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-08 11:15 [PATCH] firmware: arm_ffa: Fix ffa_notification_info_get() IDs handling Lorenzo Pieralisi
2023-11-08 11:32 ` Sudeep Holla
2023-11-13 12:24 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).