From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] net/cxgbe: free resources in dev_uninit function Date: Mon, 14 May 2018 13:19:16 +0100 Message-ID: References: <1526125800-10120-1-git-send-email-rahul.lakkireddy@chelsio.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kumaras@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com To: Rahul Lakkireddy , dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9A4521C7EB for ; Mon, 14 May 2018 14:19:20 +0200 (CEST) In-Reply-To: <1526125800-10120-1-git-send-email-rahul.lakkireddy@chelsio.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 5/12/2018 12:50 PM, Rahul Lakkireddy wrote: > Move freeing up resources from dev_close() to dev_uninit(). This fixes > NULL pointer de-reference when accessing adapter context needed by > other ports under same PF, but had been freed up by the first port. > This can happen if only the first port is started up and the check > to free up all resources is still satisfied. When dev_close is > called for other ports, adapter context is NULL since it was freed > up by the first port. > > Thus, by moving to dev_uninit() all the ports can be teared down > safely without need for extra checks. > > Fixes: 2195df6d11bd ("net/cxgbe: rework ethdev device allocation") > Signed-off-by: Rahul Lakkireddy > Signed-off-by: Kumar Sanghvi Applied to dpdk-next-net/master, thanks.