[PATCH] service: fix early move to inactive status
Van Haaren, Harry
harry.van.haaren at intel.com
Fri Oct 21 13:36:04 CEST 2022
> -----Original Message-----
> From: Carrillo, Erik G <erik.g.carrillo at intel.com>
> Sent: Thursday, October 20, 2022 8:01 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: Naga Harish K, S V <s.v.naga.harish.k at intel.com>; dev at dpdk.org;
> stable at dpdk.org
> Subject: [PATCH] service: fix early move to inactive status
>
> Assume thread T2 is a service lcore that is in the middle of executing
> a service function. Also, assume thread T1 concurrently calls
> rte_service_lcore_stop(), which will set the "service_active_on_lcore"
> state to false. If thread T1 then calls rte_service_may_be_active(),
> it can return zero even though T2 is still running the service function.
> If T1 then proceeds to free data being used by T2, a crash can ensue.
>
> Move the logic that clears the "service_active_on_lcore" state from the
> rte_service_lcore_stop() function to the service_runner_func() to
> ensure that we:
> - don't let the "service_active_on_lcore" state linger as 1
> - don't clear the state early
>
> Fixes: 6550113be62d ("service: fix lingering active status")
> Cc: stable at dpdk.org
>
> Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo at intel.com>
+CC Thomas/David, please consider for inclusion in next RC.
Thanks Erik, indeed the "active = off" store is too early in the current implementation, so:
Acked-by: Harry van Haaren <harry.van.haaren at intel.com>
<snip patch>
More information about the stable
mailing list