From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A613C2A6C for ; Fri, 3 May 2019 10:38:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2019 01:38:43 -0700 X-ExtLoop1: 1 Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.251.90.134]) ([10.251.90.134]) by orsmga002.jf.intel.com with ESMTP; 03 May 2019 01:38:42 -0700 To: Thomas Monjalon , Herakliusz Lipiec Cc: dev@dpdk.org References: <20190425114324.611-1-herakliusz.lipiec@intel.com> <20190425124817.28409-1-herakliusz.lipiec@intel.com> <3401531.dNvLWj16ye@xps> From: "Burakov, Anatoly" Message-ID: <173ee033-e181-6ea8-b567-c683ce2c5028@intel.com> Date: Fri, 3 May 2019 09:38:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <3401531.dNvLWj16ye@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 0/2] ipc: fix possible memleaks 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: Fri, 03 May 2019 08:38:45 -0000 On 03-May-19 9:34 AM, Thomas Monjalon wrote: > 25/04/2019 14:48, Herakliusz Lipiec: >> When sending multiple requests, rte_mp_request_sync >> can succeed sending a few of those requests, but then >> fail on a later one and in the end return with rc=-1. >> The upper layers - e.g. device hotplug - currently >> handles this case as if no messages were sent and no >> memory for response buffers was allocated, which is >> not true. Fixed by always initializing message buffer >> to NULL and calling free everytime rte_mp_request_sync >> is used. >> >> v2: >> - resending as patchset to make it easier to review it. > > Heraliusz, it's a total mess. > There were 8 patches in v2. Why they disappeared? > The title prefixes are often wrong, so it's harder to classify them. > > Should I merge all these patches? > ipc: fix rte_mp_request_sync memleak > ipc: fix hotplug memleak > ipc: fix vdev memleak > ipc: fix vfio memleak > ipc: fix pdump memleak > ipc: fix tap pmd memleak > ipc: fix net/mlx4 memleak > ipc: fix net/mlx5 memleak > Hi Thomas, you've also skipped the following: > v3: > - rework of the patchset > - caller is no longer responsible for freeing buffers on failure > - caller still has to free response buffers on success the v3 was where the 8 patch patchset was reworked into two-patch patchset, because we've changed our approach. So no, those 8 patches should not be merged - they're superseded by v3 (well, v4 now). -- Thanks, Anatoly From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id D2482A0AC5 for ; Fri, 3 May 2019 10:38:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A1E22B9C; Fri, 3 May 2019 10:38:46 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A613C2A6C for ; Fri, 3 May 2019 10:38:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2019 01:38:43 -0700 X-ExtLoop1: 1 Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.251.90.134]) ([10.251.90.134]) by orsmga002.jf.intel.com with ESMTP; 03 May 2019 01:38:42 -0700 To: Thomas Monjalon , Herakliusz Lipiec Cc: dev@dpdk.org References: <20190425114324.611-1-herakliusz.lipiec@intel.com> <20190425124817.28409-1-herakliusz.lipiec@intel.com> <3401531.dNvLWj16ye@xps> From: "Burakov, Anatoly" Message-ID: <173ee033-e181-6ea8-b567-c683ce2c5028@intel.com> Date: Fri, 3 May 2019 09:38:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <3401531.dNvLWj16ye@xps> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 0/2] ipc: fix possible memleaks 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190503083841.mtAb9EWajeHYobvGaK0tFIXrjkXVZDkrtp4cgoTbOd0@z> On 03-May-19 9:34 AM, Thomas Monjalon wrote: > 25/04/2019 14:48, Herakliusz Lipiec: >> When sending multiple requests, rte_mp_request_sync >> can succeed sending a few of those requests, but then >> fail on a later one and in the end return with rc=-1. >> The upper layers - e.g. device hotplug - currently >> handles this case as if no messages were sent and no >> memory for response buffers was allocated, which is >> not true. Fixed by always initializing message buffer >> to NULL and calling free everytime rte_mp_request_sync >> is used. >> >> v2: >> - resending as patchset to make it easier to review it. > > Heraliusz, it's a total mess. > There were 8 patches in v2. Why they disappeared? > The title prefixes are often wrong, so it's harder to classify them. > > Should I merge all these patches? > ipc: fix rte_mp_request_sync memleak > ipc: fix hotplug memleak > ipc: fix vdev memleak > ipc: fix vfio memleak > ipc: fix pdump memleak > ipc: fix tap pmd memleak > ipc: fix net/mlx4 memleak > ipc: fix net/mlx5 memleak > Hi Thomas, you've also skipped the following: > v3: > - rework of the patchset > - caller is no longer responsible for freeing buffers on failure > - caller still has to free response buffers on success the v3 was where the 8 patch patchset was reworked into two-patch patchset, because we've changed our approach. So no, those 8 patches should not be merged - they're superseded by v3 (well, v4 now). -- Thanks, Anatoly