From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <harry.van.haaren@intel.com> Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1C0FA8DA6 for <dev@dpdk.org>; Fri, 27 Apr 2018 17:57:41 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Apr 2018 08:57:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,335,1520924400"; d="scan'208";a="223929960" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga006.fm.intel.com with ESMTP; 27 Apr 2018 08:57:40 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by irsmsx105.ger.corp.intel.com (163.33.3.28) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 27 Apr 2018 16:57:39 +0100 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.118]) by irsmsx111.ger.corp.intel.com ([169.254.2.47]) with mapi id 14.03.0319.002; Fri, 27 Apr 2018 16:57:39 +0100 From: "Van Haaren, Harry" <harry.van.haaren@intel.com> To: "Burakov, Anatoly" <anatoly.burakov@intel.com>, "dev@dpdk.org" <dev@dpdk.org> CC: "thomas@monjalon.net" <thomas@monjalon.net>, "Burakov, Anatoly" <anatoly.burakov@intel.com> Thread-Topic: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL pointer Thread-Index: AQHT3H8Q9s2S9uBQX0S8f4XtbZEpU6QUx3MA Date: Fri, 27 Apr 2018 15:57:38 +0000 Message-ID: <E923DB57A917B54B9182A2E928D00FA65E053384@IRSMSX101.ger.corp.intel.com> References: <cover.1523979264.git.anatoly.burakov@intel.com> <cover.1524651111.git.anatoly.burakov@intel.com> <d6d551f5a856d1637a03d7689634d8d434f97c91.1524651111.git.anatoly.burakov@intel.com> In-Reply-To: <d6d551f5a856d1637a03d7689634d8d434f97c91.1524651111.git.anatoly.burakov@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjgwNWI0NmYtM2YxMS00N2ViLWFiNzktZmUwMTQ3YTgyYjMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJHdGxyZ2FOcitcL1FMZXlOcUlmRHdmSGpySkpqM2xFNktcL0xMVHlNT1dWTTF2Vk1NNXp3bVNVN0RDenRkNU9tR3cifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 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 v2 3/3] malloc: fix potential dereferencing of NULL pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> X-List-Received-Date: Fri, 27 Apr 2018 15:57:42 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov > Sent: Wednesday, April 25, 2018 11:16 AM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Burakov, Anatoly <anatoly.burakov@intel.com> > Subject: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of= NULL > pointer >=20 > Previous code checked for both first/last elements being NULL, > but if they weren't, the expectation was that they're both > non-NULL, which will be the case under normal conditions, but > may not be the case due to heap structure corruption. >=20 > Coverity issue: 272566 >=20 > Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list") > Cc: anatoly.burakov@intel.com >=20 > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Had to do a double-take there - that's a novel way of checking pointers - but it actually makes sense here :) Acked-by: Harry van Haaren <harry.van.haaren@intel.com>