From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id 7FFC2212 for ; Wed, 1 Oct 2014 15:30:14 +0200 (CEST) Received: by mail-wi0-f169.google.com with SMTP id cc10so535254wib.2 for ; Wed, 01 Oct 2014 06:36:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=/jM2d9pAzRzFQhfyBKTFz1+gRyQhA4uca5UO6py2DAE=; b=Qg0XD6/nz6uzpHzMTar3iEq+XLz5ift2q0OZAJwBZwheRFMmI5Mk2pDIG5CTXOfe+M fygITuw89MgbYnB1CX97AAtRspD011kLfkHS6z/ikwjiLlSeFEefQA9SOC05ci5vkGi7 INlTrpe0negX/o5Nszc6cJjLpCS31Q2O6PUzcJqVxEgpR2GwlUU7ZrFXsxTdRPjcU6f3 g5WOqcbveqDPhYkca2GmokZepnuaAZQGP6VRM1tfPQrDakYlh7e5RLCGadyu2lRhCwbC C+Eck434sOCpMO8fMaFv7Usfv8f6A/3qepDoXUxCCmvW8pvZ3tr4YiJfJVy12UCNIYmq eaPg== X-Gm-Message-State: ALoCoQn3XEl1ioARu0W0BMpQI6rYo9dv0KL1QJDrLtTZ0IsA6HFBXxqRaLkSrcuJewFCRcOa3968 X-Received: by 10.194.143.69 with SMTP id sc5mr60940792wjb.26.1412170617908; Wed, 01 Oct 2014 06:36:57 -0700 (PDT) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id xm4sm1911690wib.9.2014.10.01.06.36.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Oct 2014 06:36:57 -0700 (PDT) From: Thomas Monjalon To: "Wiles, Roger Keith" Date: Wed, 01 Oct 2014 15:36:45 +0200 Message-ID: <8437457.lrG762lvxy@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: <20140928122706.GB30445@localhost.localdomain> References: <05E7C1C5-2730-4BE3-B808-6F69821F7898@windriver.com> <20140928122706.GB30445@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] rte_mempool_dump() crashes with NULL rte_mempool pointer. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 13:30:14 -0000 2014-09-28 08:27, Neil Horman: > On Sun, Sep 28, 2014 at 05:28:44AM +0000, Wiles, Roger Keith wrote: > > Check the FILE *f and rte_mempool *mp pointers for NULL and > > return plus print out a message if RTE_LIBRTE_MEMPOOL_DEBUG is enabled. > > > > Signed-off-by: Keith Wiles > > I'm fine with this, as I think passing in a NULL mempool is clearly a bug here, > thats worth panicing over, though I wouldnt mind if we did a RTE_VERIFY_WARN > macro here instead using what I suggested in my other note Passing a NULL mempool to rte_mempool_dump() is a bug in the application. If you look elsewhere in the DPDK code, you'll see that it's not common to do such check on input parameters. A similar discussion already happened few months ago: http://dpdk.org/ml/archives/dev/2014-June/003900.html -- Thomas