From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 98A1E2B9C; Wed, 28 Mar 2018 14:26:06 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1FA04210CC; Wed, 28 Mar 2018 08:26:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 28 Mar 2018 08:26:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=KD7WvGX+7SzqZUnJCthmQ9UBeC ySBFdEYJXthFXv/7U=; b=Ilgo1nngXe9zB3/hFWpAmL0rFFUv7Dp2NZz3qjx09H IM1GVb5OWBebE/pRx5VbBKZ1auMX+kF03Zs4LfH159Deh3x6rUVnRI0DZdqqxmUV b5XqZfrYBhGzFQQA2FycFJEfbn0sbLSOAaZng/naCgT+7s9pRz9KUKwPYoPBfj/+ w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=KD7WvG X+7SzqZUnJCthmQ9UBeCySBFdEYJXthFXv/7U=; b=W9ptHf4hLN66UbwX0Regtr 2aPzSzrQwxTh0R5Pa9Fc8KKuolF3tRYf7ueJ6aYGsTUbOpQC9ivhJXSWTBn31sX5 mkgFlBJv2+RepA2gDf4TDjOIDNvO8LmkVWOgCPcUZ+gv3nhxeZutsQk54gHXsOsp LUdThYSNIzv/nJAPTQuW40dT9CoCURnG/s5gCS2Hf//+MAUI67DUc8sxpdyxYceh AgsZIifcvtqpxpHBhS3OBu+3/6XpFUvLEepPsX68Mu3mngjESWy/UdgrlwwQ9L20 DlGn+PodjUGnnpAP1xscDSFieoz2HuCsS8QnH6zl0LBGLORoOeT7wF3z2aW0u8Sg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5D14FE443C; Wed, 28 Mar 2018 08:26:05 -0400 (EDT) From: Thomas Monjalon To: Matan Azrad Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org Date: Wed, 28 Mar 2018 14:25:43 +0200 Message-ID: <1634334.By0c0X4AGY@xps> In-Reply-To: <1522239030-24489-1-git-send-email-matan@mellanox.com> References: <1522239030-24489-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] ethdev: fix port accessing after release 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, 28 Mar 2018 12:26:06 -0000 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