From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D967DA05D3 for ; Thu, 23 May 2019 05:05:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6485F1B948; Thu, 23 May 2019 05:05:43 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 936039E4; Thu, 23 May 2019 05:05:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 20:05:38 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 22 May 2019 20:05:38 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 20:05:37 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 20:05:37 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.10]) by shsmsx102.ccr.corp.intel.com ([169.254.2.249]) with mapi id 14.03.0415.000; Thu, 23 May 2019 11:05:36 +0800 From: "Pei, Andy" To: "Xu, Rosen" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] net/ipn3ke: check input arguement before other operation Thread-Index: AQHVEG/Q9PhAKtvtX0O6zzE+vuZr5aZ3/hrggAAJkXA= Date: Thu, 23 May 2019 03:05:35 +0000 Message-ID: <5941F446C088714A85408FA3132CFCBB01019236@SHSMSX105.ccr.corp.intel.com> References: <1558509691-429834-1-git-send-email-andy.pei@intel.com> <0E78D399C70DA940A335608C6ED296D73A76EB17@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <0E78D399C70DA940A335608C6ED296D73A76EB17@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH] net/ipn3ke: check input arguement before other operation 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, Rosen, It will be fixed in v2. -----Original Message----- From: Xu, Rosen=20 Sent: Thursday, May 23, 2019 10:31 AM To: Pei, Andy ; dev@dpdk.org Cc: stable@dpdk.org Subject: RE: [PATCH] net/ipn3ke: check input arguement before other operati= on Hi, > -----Original Message----- > From: Pei, Andy > Sent: Wednesday, May 22, 2019 15:22 > To: dev@dpdk.org > Cc: Pei, Andy ; Xu, Rosen ;=20 > stable@dpdk.org > Subject: [PATCH] net/ipn3ke: check input arguement before other=20 > operation >=20 > check input arguement rte_eth_dev *ethdev, ensuring ethdev is not NULl=20 > before operation on ethdev. >=20 > Coverity issue: 337922 > Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor") > Cc: rosen.xu@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Andy Pei > --- > drivers/net/ipn3ke/ipn3ke_representor.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c > b/drivers/net/ipn3ke/ipn3ke_representor.c > index cf3b214..32d4fc8 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 =3D IPN3KE_DEV_PRIVATE_TO_HW(ethdev); > - struct ipn3ke_rpst *rpst =3D IPN3KE_DEV_PRIVATE_TO_RPST(ethdev); > int ret =3D 0; > + struct ipn3ke_hw *hw =3D NULL; > + struct ipn3ke_rpst *rpst =3D NULL; No need to initialize point variable. > if (ethdev =3D=3D NULL) > return -EINVAL; >=20 > + hw =3D IPN3KE_DEV_PRIVATE_TO_HW(ethdev); > + rpst =3D IPN3KE_DEV_PRIVATE_TO_RPST(ethdev); > + > if (hw->acc_flow) > switch (filter_type) { > case RTE_ETH_FILTER_GENERIC: > -- > 1.8.3.1