From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f49.google.com (mail-pg0-f49.google.com [74.125.83.49]) by dpdk.org (Postfix) with ESMTP id A4AA37D83 for ; Mon, 21 Aug 2017 11:34:15 +0200 (CEST) Received: by mail-pg0-f49.google.com with SMTP id n4so33216200pgn.1 for ; Mon, 21 Aug 2017 02:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LKB5CH2DXi+BqKtUCExeKnpEYsPii6pq1hBOuKK01so=; b=Bm7mp8aej/IqeYTOy2MpB5Ue5NrZJU+fASB57yb6PFs1r8Gb2+6uCv8IzmSDppJFdP BaFZhLGvFcbEqrXTEK///kahINFFUO5tnr7knlCQOeBIgSY5cf1zzPfQvik/WmIA94bg g9Onjj2qUI4MdXB8kcQt6DWepn67dY9Z7SrBxljLV9Bd7vYJF6w/ceB6l7btEP2ilFpq Edi5+Sgy37jdqN13HAf67XveGxarkoQlmJf8qJSJFyakjwtHneCv1Kzm8dZS++06ibch zdyfEQPgSAOOTl0zSOu2p9MQN3eKaQzbheuGr9X8u0xu+H3HanomdQDcWVsEs2/l0ruW ioow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LKB5CH2DXi+BqKtUCExeKnpEYsPii6pq1hBOuKK01so=; b=t4BQ9P4iDKNViIeWmeUAeUVokuxLAsXeF8+FjEOtxFiUofsBOmLmipEM3e1Jx7SkWe hKkXNMOEtUmg6ddZj1bqJ6y5WFyM+YhiqfxZNcFptoc7qrwQhuNFxRdTlKjSLG0Yb0zU VaqR3MLXre8JM8Xg6kSoDL0aSZ6V2gqKfHpsKFqm7yJ/31JtkPN3AufeSz/9ZQLDzlK/ kvpDugDMzOk7YhhKQ8M9kkEFiKfGHsHzAsvFYImCpBBFEA1/WxN9tjJhz9NyFOPjziiC sbIKVOp59d80ncszvXJnrKyrMn/HUALnSyVS1juHkDk7zo5DeJJSFB/m2uqPW+SQiXrr NrLQ== X-Gm-Message-State: AHYfb5hFfVIqFt39EKx0CQv4P3J82rYmouKCrlxsPVFKUjz+HMbBJBPV QqmiN7gdf6/5fggq X-Received: by 10.99.54.138 with SMTP id d132mr15941997pga.156.1503308055012; Mon, 21 Aug 2017 02:34:15 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 69sm23355087pfh.186.2017.08.21.02.34.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Aug 2017 02:34:13 -0700 (PDT) From: Yuanhan Liu To: Harry van Haaren Cc: Jerin Jacob , dpdk stable , Yuanhan Liu Date: Mon, 21 Aug 2017 17:30:28 +0800 Message-Id: <1503307878-16728-14-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> References: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'eventdev: fix memory realloc check in port config' has been queued to stable release 17.05.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 09:34:15 -0000 Hi, FYI, your patch has been queued to stable release 17.05.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 3595ca9a6aa074cb4b08a44c9122e64af92254f7 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Mon, 17 Jul 2017 17:09:47 +0100 Subject: [PATCH] eventdev: fix memory realloc check in port config [ upstream commit f9a96a50d8abc03f704d02defc8cb6238ff20a58 ] This commit fixes the check to use the just reallocated links_map variable, instead of stale dev->data->links_map. Later the new variable is written to the dev->data->links_map, so the stale-ness is only temporary. Coverity issue: 143456 Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs") Signed-off-by: Harry van Haaren Reviewed-by: Jerin Jacob --- lib/librte_eventdev/rte_eventdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index 20afc3f..755f9f7 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -301,7 +301,7 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports) sizeof(dev->data->links_map[0]) * nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV, RTE_CACHE_LINE_SIZE); - if (dev->data->links_map == NULL) { + if (links_map == NULL) { dev->data->nb_ports = 0; RTE_EDEV_LOG_ERR("failed to realloc mem for port_map," "nb_ports %u", nb_ports); -- 2.7.4