From: "Xu, Rosen" <rosen.xu@intel.com>
To: "Pei, Andy" <andy.pei@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/ipn3ke: check input argument before other operation
Date: Thu, 23 May 2019 02:59:30 +0000 [thread overview]
Message-ID: <0E78D399C70DA940A335608C6ED296D73A76ECD7@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1558579983-142573-1-git-send-email-andy.pei@intel.com>
Hi,
> -----Original Message-----
> From: Pei, Andy
> Sent: Thursday, May 23, 2019 10:53
> To: dev@dpdk.org
> Cc: Pei, Andy <andy.pei@intel.com>; Xu, Rosen <rosen.xu@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v2] net/ipn3ke: check input argument before other
> operation
>
> check input argument rte_eth_dev *ethdev, ensuring ethdev is not NULL
> before operation on ethdev.
>
> Coverity issue: 337922
> Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
> Cc: rosen.xu@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
> drivers/net/ipn3ke/ipn3ke_representor.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index cf3b214..f7bb0b4 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -735,13 +735,16 @@
> enum rte_filter_type filter_type, enum rte_filter_op filter_op,
> void *arg)
> {
> - struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev);
> - struct ipn3ke_rpst *rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
> int ret = 0;
> + struct ipn3ke_hw *hw;
> + struct ipn3ke_rpst *rpst;
>
> if (ethdev == NULL)
> return -EINVAL;
>
> + hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev);
> + rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
> +
> if (hw->acc_flow)
> switch (filter_type) {
> case RTE_ETH_FILTER_GENERIC:
> --
> 1.8.3.1
Acked-by: Rosen Xu <rosen.xu@intel.com>
next prev parent reply other threads:[~2019-05-23 2:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 7:21 [dpdk-dev] [PATCH] net/ipn3ke: check input arguement " Andy Pei
2019-05-23 2:30 ` Xu, Rosen
2019-05-23 3:05 ` Pei, Andy
2019-05-23 2:53 ` [dpdk-dev] [PATCH v2] net/ipn3ke: check input argument " Andy Pei
2019-05-23 2:59 ` Xu, Rosen [this message]
2019-06-18 13:31 ` Zhang, Qi Z
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=0E78D399C70DA940A335608C6ED296D73A76ECD7@SHSMSX104.ccr.corp.intel.com \
--to=rosen.xu@intel.com \
--cc=andy.pei@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).