From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] ethdev: fix port accessing after release Date: Wed, 28 Mar 2018 14:25:43 +0200 Message-ID: <1634334.By0c0X4AGY@xps> References: <1522239030-24489-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org To: Matan Azrad Return-path: In-Reply-To: <1522239030-24489-1-git-send-email-matan@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 28/03/2018 14:10, Matan Azrad: > rte_eth_dev_pci_release() function wrongly releases an ethdev port and > then releases internal fields of this port. > This behavior is problematic, because after the release, the port may > be reallocated again by another thread or just be invalid for any > usage. > > Move the release operation to the end of the function. > > Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers") > Cc: stable@dpdk.org > > Suggested-by: Ferruh Yigit > Signed-off-by: Matan Azrad Acked-by: Thomas Monjalon