From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C6C022A5E for ; Wed, 22 Feb 2017 03:34:15 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Feb 2017 18:34:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,192,1484035200"; d="scan'208";a="936667896" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 21 Feb 2017 18:34:13 -0800 Date: Wed, 22 Feb 2017 10:36:23 +0800 From: Yuanhan Liu To: hanxueluo@126.com Cc: dev@dpdk.org, Huanle Han , David Marchand Message-ID: <20170222023623.GO18844@yliu-dev.sh.intel.com> References: <1487599487-12574-1-git-send-email-hanxueluo@126.com> <1487599487-12574-3-git-send-email-hanxueluo@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487599487-12574-3-git-send-email-hanxueluo@126.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 3/3] pci: fix crash caused by invaild memory write 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: Wed, 22 Feb 2017 02:34:16 -0000 cc the EAL maintainer, David Marchand. On Mon, Feb 20, 2017 at 10:04:47PM +0800, hanxueluo@126.com wrote: > From: Huanle Han > > rte_eal_dev_detach() didn't remove dev from dev_device_list > after free the dev. So the following attached dev wrote to > the freed memory (tailq entry of previous dev) in below stack: > > == Invalid write of size 8 > == at 0x43A9CE: rte_eal_device_insert (eal_common_dev.c:71) > == by 0x42ED9E: pci_scan_one (eal_pci.c:365) > == by 0x42EF4D: pci_update_device (eal_pci.c:391) > == by 0x437F59: rte_eal_pci_probe_one (eal_common_pci.c:357) > == by 0x43AB16: rte_eal_dev_attach (eal_common_dev.c:117) > == by 0x45B3AA: rte_eth_dev_attach (rte_ethdev.c:489) > == ... > > Signed-off-by: Huanle Han The two minor nits also apply here, besides that, Reviewed-by: Yuanhan Liu --yliu