From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 220AAA0540; Mon, 4 Jul 2022 17:39:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04968410E5; Mon, 4 Jul 2022 17:39:35 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id EB75C40E09; Mon, 4 Jul 2022 17:39:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656949173; x=1688485173; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=962muGki+4l1BOrB67dgbjwaNJ0lUjjCauKNPQQYrKI=; b=A1ta/YXA2I8DxS2hBYP1DEUkb7w/tBZXByfkvWJPGV5GjBVC6XKbU6KG oc4F0LSDWu7hZdVZRKEdQJvJkQ5/rH0gtyfY/pRuEBkdUAa6F75SjZZOQ oXTKaEyplY/yUqsgsG56Oh/khVqQIsEqSqw2bIU5MKf8xiOJWXbqt80ga IyKKo68t4YwZTPQguXKiF9ehT21INlQRxR20gQy5N/2WgUK6EUEGBNvtm K5GhNCC5/i3/VN+7x0q6zmT/wt/CMSsQPB3VbyncfeJXOBsM9EamOapGx Yif4a7obGIiGstcQttMCU3JMH9NzbtBh6uISBxbrvdTy2S6g4xmRB0Fuv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10398"; a="280710743" X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="280710743" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2022 08:39:31 -0700 X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208";a="619335020" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.37]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 04 Jul 2022 08:39:30 -0700 Date: Mon, 4 Jul 2022 16:39:27 +0100 From: Bruce Richardson To: Kevin Laatz Cc: dev@dpdk.org, stable@dpdk.org, Xingguang He Subject: Re: [PATCH v3 1/3] dma/idxd: fix memory leak in pci close Message-ID: References: <20220408141504.1319913-1-kevin.laatz@intel.com> <20220704152751.943965-1-kevin.laatz@intel.com> <20220704152751.943965-2-kevin.laatz@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220704152751.943965-2-kevin.laatz@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jul 04, 2022 at 04:27:49PM +0100, Kevin Laatz wrote: > ASAN reports a memory leak for the 'pci' pointer in the 'idxd_dmadev' > struct. > > This is fixed by free'ing the struct when the last queue on the PCI > device is being closed. > > Fixes: 9449330a8458 ("dma/idxd: create dmadev instances on PCI probe") > Cc: stable@dpdk.org > Cc: bruce.richardson@intel.com > > Reported-by: Xingguang He > Signed-off-by: Kevin Laatz > > -- > v3: move ref_count increment to pci probe > --- Acked-by: Bruce Richardson