From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 0D8FC2A66 for ; Sun, 22 Apr 2018 17:11:59 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9A69B20FED; Sun, 22 Apr 2018 11:11:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 22 Apr 2018 11:11:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/8VrrNonNtoyE5gfF QGelhGJJ33cWmbJ1av/ArN/0xc=; b=thHFPDqD0Zys73sN7b0SzzSntF5OIMeg8 VQnLZfgHd70ekPUc7Mmk04h9F8yMqyI/crFAuQxV+7EJ2SVEFpkNpt16I7FPeHWX 2qh85LABM9hYCh44asC94pDZkKWQZMA41vMAe3BUEhpdJyDqWmm4hguhxAmE0u2P JnqI4UONRxwIFpCi63gDBZ1TFhNMpIuJfG66b/pqGEjHWyz63MlX0Zm4xI2ZoipL r7SoSSqs2mO2LhwdfxEdvX6UlWZvQO7nyEboiutCOg2fJI3RomUCbe9WTFFHSzQQ fMv1R53gVTAIBCwHDvjAFcz5LhN/Q5igxyN38JIYzqNDPG1QHZssQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=/8VrrNonNtoyE5gfFQGelhGJJ33cWmbJ1av/ArN/0xc=; b=UyU1Weri gLMjbYz0RWFlNIZbtNl2JqGH881FtAZMtOaT8oVJkVs7G3cwxWhtpwNluPOFVj5a G/wMYrNIfq1ajRLky1yV9ANZDoOgzvd5Xbzs/zzbNYxk3VtWhqlTieNqktdN+VGI RGRcZjMFG+H9G79K3Im31UF1HI3IjeZJSREZUHOSfxlmWagEjhpZAoJzKk3KLCt/ cLg/avy+7vfhngIH5F76YqrblLkiUfX+hbULlY9/MLO4H6C6kKIytEHzucDyUIAe 2fpEi9dR4Uc3LfrsWEa3VRaSOASP5iZrGlmHvLRPcJs+mX/2AJSNxMeqRSjUSbna bP5LR6JXlJO/xg== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.66]) by mail.messagingengine.com (Postfix) with ESMTPA id 7F2521025D; Sun, 22 Apr 2018 11:11:56 -0400 (EDT) From: Yuanhan Liu To: Hemant Agrawal Cc: Shreyansh Jain , dpdk stable Date: Sun, 22 Apr 2018 23:09:33 +0800 Message-Id: <20180422150949.17523-43-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422150949.17523-1-yliu@fridaylinux.org> References: <20180422150949.17523-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/dpaa: fix oob access' has been queued to LTS release 17.11.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: Sun, 22 Apr 2018 15:11:59 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.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 04/29/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 1917ba488cf3bc66ab1008bbe721ac2cf12a8aa3 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Mon, 9 Apr 2018 15:52:47 +0530 Subject: [PATCH] net/dpaa: fix oob access [ upstream commit 5c3fc73e820ac0365ae1c1da5546572ac80e64cf ] Coverity issue: 268318 Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics") Signed-off-by: Hemant Agrawal Acked-by: Shreyansh Jain --- drivers/net/dpaa/dpaa_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index e4375c373..02056bc66 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -324,10 +324,13 @@ dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, static int dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, - __rte_unused unsigned int limit) + unsigned int limit) { unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings); + if (limit < stat_cnt) + return stat_cnt; + if (xstats_names != NULL) for (i = 0; i < stat_cnt; i++) snprintf(xstats_names[i].name, @@ -355,7 +358,7 @@ dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, return 0; fman_if_stats_get_all(dpaa_intf->fif, values_copy, - sizeof(struct dpaa_if_stats)); + sizeof(struct dpaa_if_stats) / 8); for (i = 0; i < stat_cnt; i++) values[i] = -- 2.11.0