From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hiroyuki Mikita Subject: [PATCH] timer: fix incorrect pending-list manipulation Date: Sun, 17 Jul 2016 23:35:39 +0900 Message-ID: <1468766139-29545-1-git-send-email-h.mikita89@gmail.com> Cc: dev@dpdk.org To: rsanford@akamai.com Return-path: Received: from mail-pa0-f67.google.com (mail-pa0-f67.google.com [209.85.220.67]) by dpdk.org (Postfix) with ESMTP id 2DDEC5690 for ; Sun, 17 Jul 2016 16:35:54 +0200 (CEST) Received: by mail-pa0-f67.google.com with SMTP id hh10so9376877pac.1 for ; Sun, 17 Jul 2016 07:35:54 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This commit fixes incorrect pending-list manipulation when getting list of expired timers in rte_timer_manage(). When timer_get_prev_entries() sets pending_head on prev, the pending-list is broken. The next of pending_head always becomes NULL. In this depth level, it is not need to manipulate the list. Signed-off-by: Hiroyuki Mikita --- lib/librte_timer/rte_timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 3dcdab5..7457d32 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -543,6 +543,8 @@ void rte_timer_manage(void) /* break the existing list at current time point */ timer_get_prev_entries(cur_time, lcore_id, prev); for (i = priv_timer[lcore_id].curr_skiplist_depth -1; i >= 0; i--) { + if (prev[i] == &priv_timer[lcore_id].pending_head) + continue; priv_timer[lcore_id].pending_head.sl_next[i] = prev[i]->sl_next[i]; if (prev[i]->sl_next[i] == NULL) -- 2.7.4