From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B04C2726F; Thu, 11 Jan 2018 15:17:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 06:17:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,344,1511856000"; d="scan'208";a="165972106" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga004.jf.intel.com with ESMTP; 11 Jan 2018 06:17:27 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX151.ger.corp.intel.com ([169.254.4.108]) with mapi id 14.03.0319.002; Thu, 11 Jan 2018 14:17:27 +0000 From: "Dumitrescu, Cristian" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "Kerlin, Marcin" , "stable@dpdk.org" Thread-Topic: [PATCH] test: fix uninitialized parameter in table autotest Thread-Index: AQHTenPUaxVPA8aRak+cUY7x8sLtfKNu2Nog Date: Thu, 11 Jan 2018 14:17:26 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BAFBBCA@IRSMSX108.ger.corp.intel.com> References: <846bcc6aa9ec715cc750949e08b80f07341a91fa.1513865562.git.anatoly.burakov@intel.com> In-Reply-To: <846bcc6aa9ec715cc750949e08b80f07341a91fa.1513865562.git.anatoly.burakov@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.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] test: fix uninitialized parameter in table autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 14:17:30 -0000 > -----Original Message----- > From: Burakov, Anatoly > Sent: Thursday, December 21, 2017 3:53 PM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Kerlin, Marcin > ; stable@dpdk.org > Subject: [PATCH] test: fix uninitialized parameter in table autotest >=20 > delete_bulk() copies metadata to pointers provided by the entries > parameter, but in the unit test, they are uninitialized, leading > to rte_table attempting to memcpy into random garbage pointers. >=20 > Memsetting pointer table to zero will prevent that from happening. >=20 > Fixes: 48f2543cf0a8 ("app/test: add bulk adding and deleting") > Cc: marcinx.kerlin@intel.com > Cc: stable@dpdk.org > Signed-off-by: Anatoly Burakov > --- > test/test/test_table_acl.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/test/test/test_table_acl.c b/test/test/test_table_acl.c > index 08c100f..6fcf4cc 100644 > --- a/test/test/test_table_acl.c > +++ b/test/test/test_table_acl.c > @@ -532,6 +532,8 @@ setup_acl_pipeline(void) > struct rte_pipeline_table_entry *table_entries[5]; > int key_found[5]; >=20 > + memset(table_entries, 0, sizeof(table_entries)); > + > for (n =3D 0; n < 5; n++) { > memset(&keys[n], 0, sizeof(struct > rte_table_acl_rule_delete_params)); > key_array[n] =3D &keys[n]; > -- > 2.7.4 Acked-by: Cristian Dumitrescu