From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 0DC5D6CC5 for ; Mon, 20 Jun 2016 13:02:18 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 20 Jun 2016 04:02:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,498,1459839600"; d="scan'208";a="979545637" Received: from rhorton-mobl.ger.corp.intel.com (HELO [163.33.228.132]) ([163.33.228.132]) by orsmga001.jf.intel.com with ESMTP; 20 Jun 2016 04:02:16 -0700 To: Yuanhan Liu , dev@dpdk.org References: <1466419843-1321-1-git-send-email-yuanhan.liu@linux.intel.com> Cc: huawei.xie@intel.com From: Remy Horton Organization: Intel Shannon Limited Message-ID: Date: Mon, 20 Jun 2016 12:02:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1466419843-1321-1-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] virtio: fix crash on querying xstats 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: Mon, 20 Jun 2016 11:02:19 -0000 On 20/06/2016 11:50, Yuanhan Liu wrote: > Trying to access xstats_names after "if (stats_names == NULL)" is > obviously wrong, which would result to a crash while running "show > port xstats 0" in testpmd with virtio PMD. > > The fix is also straightforward: just revese the check. > > Fixes: baf91c395b18 ("net/virtio: fetch extended statistics with integer ids") > > Cc: Remy Horton > Signed-off-by: Yuanhan Liu Acked-by: Remy Horton