DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: Hemant Agrawal <hemant.agrawal@nxp.com>, ferruh.yigit@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 4/8] net/dpaa: fix the oob access
Date: Mon, 9 Apr 2018 12:53:26 +0530	[thread overview]
Message-ID: <8e340f7c-b20d-0947-5ef0-a6482a09094b@nxp.com> (raw)
In-Reply-To: <1522918464-4586-4-git-send-email-hemant.agrawal@nxp.com>

On Thursday 05 April 2018 02:24 PM, Hemant Agrawal wrote:
> Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics")
> Coverity issue: 268318
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>   drivers/net/dpaa/dpaa_ethdev.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
> index 0aad111..cbdc4f2 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -339,6 +339,9 @@ dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev,

Definition of this function is:

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 i, stat_cnt = RTE_DIM(dpaa_xstats_strings);
>   
> +	if (limit < stat_cnt)
> +		return stat_cnt;

As this patch is using the 'limit' argument, '__rte_unused' should be 
removed from the function arguments.

> +
>   	if (xstats_names != NULL)
>   		for (i = 0; i < stat_cnt; i++)
>   			snprintf(xstats_names[i].name,
> @@ -366,7 +369,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] =
> 

Once the above is correct, please use:

Acked-By: Shreyansh Jain <shreyansh.jain@nxp.com>

  reply	other threads:[~2018-04-09  7:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05  8:54 [dpdk-dev] [PATCH 1/8] bus/dpaa: fix the resource leak issue Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 2/8] bus/dpaa: fix the unchecked return value Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 3/8] net/dpaa: fix the array overrun Hemant Agrawal
2018-04-09  5:29   ` Shreyansh Jain
2018-04-05  8:54 ` [dpdk-dev] [PATCH 4/8] net/dpaa: fix the oob access Hemant Agrawal
2018-04-09  7:23   ` Shreyansh Jain [this message]
2018-04-05  8:54 ` [dpdk-dev] [PATCH 5/8] bus/dpaa: fix resource leak Hemant Agrawal
2018-04-09  7:18   ` Shreyansh Jain
2018-04-05  8:54 ` [dpdk-dev] [PATCH 6/8] net/dpaa: update checksum for external pool obj Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 7/8] net/dpaa2: fix the implementation of xstats Hemant Agrawal
2018-04-05  8:54 ` [dpdk-dev] [PATCH 8/8] bus/fslmc: configure separate portal for Ethernet Rx Hemant Agrawal
2018-04-09 10:22 ` [dpdk-dev] [PATCH v2 1/8] bus/dpaa: fix the resource leak issue Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 2/8] bus/dpaa: fix the unchecked return value Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 3/8] net/dpaa: fix the array overrun Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 4/8] net/dpaa: fix the oob access Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 5/8] bus/dpaa: fix resource leak Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 6/8] net/dpaa: update checksum for external pool obj Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 7/8] net/dpaa2: fix the implementation of xstats Hemant Agrawal
2018-04-09 10:22   ` [dpdk-dev] [PATCH v2 8/8] bus/fslmc: configure separate portal for Ethernet Rx Hemant Agrawal
2018-04-11 22:20   ` [dpdk-dev] [PATCH v2 1/8] bus/dpaa: fix the resource leak issue Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e340f7c-b20d-0947-5ef0-a6482a09094b@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hemant.agrawal@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).