[dpdk-stable] [dpdk-dev] [PATCH v3] lib/librte_timer:fix corruption with reset
Stephen Hemminger
stephen at networkplumber.org
Fri Jul 10 17:19:10 CEST 2020
On Fri, 10 Jul 2020 11:59:54 +0500
Sarosh Arif <sarosh.arif at emumba.com> wrote:
> If the user tries to reset/stop some other timer in it's callback
> function, which is also about to expire, using
> rte_timer_reset_sync/rte_timer_stop_sync the application goes into
> an infinite loop. This happens because
> rte_timer_reset_sync/rte_timer_stop_sync loop until the timer
> resets/stops and there is check inside timer_set_config_state which
> prevents a running timer from being reset/stopped by not it's own
> timer_cb. Therefore timer_set_config_state returns -1 due to which
> rte_timer_reset returns -1 and rte_timer_reset_sync goes into an
> infinite loop.
>
> The soloution to this problem is to return -1 from
> rte_timer_reset_sync/rte_timer_stop_sync in case the user tries to
> reset/stop some other timer in it's callback function.
>
> Bugzilla ID: 491
> Fixes: 20d159f20543 ("timer: fix corruption with reset")
> Cc: h.mikita89 at gmail.com
> Signed-off-by: Sarosh Arif <sarosh.arif at emumba.com>
> ---
> v2: remove line continuations
> v3: separate code and declarations
If you want to change the return value, you need to go through the steps
in the API/ABI policy. Maybe even symbol versioning.
Sorry, I know it is painful but we committed to the rules.
And changing the return value can never go to stable.
More information about the stable
mailing list