From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <herakliusz.lipiec@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 4D46B5F72
 for <dev@dpdk.org>; Tue, 23 Apr 2019 19:43:23 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 23 Apr 2019 10:43:22 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,386,1549958400"; d="scan'208";a="226004713"
Received: from silpixa00399499.ir.intel.com (HELO
 silpixa00399499.ger.corp.intel.com) ([10.237.222.133])
 by orsmga001.jf.intel.com with ESMTP; 23 Apr 2019 10:43:19 -0700
From: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
To: 
Cc: dev@dpdk.org,
	Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Date: Tue, 23 Apr 2019 18:43:26 +0100
Message-Id: <20190423174334.19612-1-herakliusz.lipiec@intel.com>
X-Mailer: git-send-email 2.17.2
In-Reply-To: <20190417143822.21276-1-herakliusz.lipiec@intel.com>
References: <20190417143822.21276-1-herakliusz.lipiec@intel.com>
Subject: [dpdk-dev] [PATCH v2 0/8] ipc: fix possible memleaks
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Apr 2019 17:43:23 -0000

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.
- changed commit message as requested.
- added bugzilla id.
Bugzilla ID: 228

Herakliusz Lipiec (8):
  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

 drivers/bus/vdev/vdev.c                 | 3 +--
 drivers/net/mlx4/mlx4_mp.c              | 4 +++-
 drivers/net/mlx5/mlx5_mp.c              | 4 +++-
 drivers/net/tap/rte_eth_tap.c           | 2 ++
 lib/librte_eal/common/eal_common_proc.c | 6 +++---
 lib/librte_eal/common/hotplug_mp.c      | 2 ++
 lib/librte_eal/common/include/rte_eal.h | 3 ++-
 lib/librte_eal/linux/eal/eal_vfio.c     | 8 ++++----
 lib/librte_pdump/rte_pdump.c            | 2 +-
 9 files changed, 21 insertions(+), 13 deletions(-)

-- 
2.17.2

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 8E048A05D3
	for <public@inbox.dpdk.org>; Tue, 23 Apr 2019 19:43:25 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 687021B0F8;
	Tue, 23 Apr 2019 19:43:24 +0200 (CEST)
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 4D46B5F72
 for <dev@dpdk.org>; Tue, 23 Apr 2019 19:43:23 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 23 Apr 2019 10:43:22 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,386,1549958400"; d="scan'208";a="226004713"
Received: from silpixa00399499.ir.intel.com (HELO
 silpixa00399499.ger.corp.intel.com) ([10.237.222.133])
 by orsmga001.jf.intel.com with ESMTP; 23 Apr 2019 10:43:19 -0700
From: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
To: 
Cc: dev@dpdk.org,
	Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Date: Tue, 23 Apr 2019 18:43:26 +0100
Message-Id: <20190423174334.19612-1-herakliusz.lipiec@intel.com>
X-Mailer: git-send-email 2.17.2
In-Reply-To: <20190417143822.21276-1-herakliusz.lipiec@intel.com>
References: <20190417143822.21276-1-herakliusz.lipiec@intel.com>
Subject: [dpdk-dev] [PATCH v2 0/8] ipc: fix possible memleaks
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <20190423174326.AZgIOn4TFXF8482o4r45sbvcnnHN6EMrDwf83qqtFH0@z>

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.
- changed commit message as requested.
- added bugzilla id.
Bugzilla ID: 228

Herakliusz Lipiec (8):
  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

 drivers/bus/vdev/vdev.c                 | 3 +--
 drivers/net/mlx4/mlx4_mp.c              | 4 +++-
 drivers/net/mlx5/mlx5_mp.c              | 4 +++-
 drivers/net/tap/rte_eth_tap.c           | 2 ++
 lib/librte_eal/common/eal_common_proc.c | 6 +++---
 lib/librte_eal/common/hotplug_mp.c      | 2 ++
 lib/librte_eal/common/include/rte_eal.h | 3 ++-
 lib/librte_eal/linux/eal/eal_vfio.c     | 8 ++++----
 lib/librte_pdump/rte_pdump.c            | 2 +-
 9 files changed, 21 insertions(+), 13 deletions(-)

-- 
2.17.2