From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <aburakov@ecsmtp.ir.intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id F32302965;
 Fri, 29 Mar 2019 11:56:17 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 29 Mar 2019 03:56:17 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,284,1549958400"; d="scan'208";a="331844226"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by fmsmga006.fm.intel.com with ESMTP; 29 Mar 2019 03:56:16 -0700
Received: from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com [10.243.17.64])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 x2TAuFsK017469; Fri, 29 Mar 2019 10:56:15 GMT
Received: from sivswdev05.ir.intel.com (localhost [127.0.0.1])
 by sivswdev05.ir.intel.com with ESMTP id x2TAuF2g001182;
 Fri, 29 Mar 2019 10:56:15 GMT
Received: (from aburakov@localhost)
 by sivswdev05.ir.intel.com with LOCAL id x2TAuFKv001178;
 Fri, 29 Mar 2019 10:56:15 GMT
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org
Date: Fri, 29 Mar 2019 10:56:15 +0000
Message-Id: <8f8c3997f0cd872487482607b2925ab9b05ca7d1.1553856935.git.anatoly.burakov@intel.com>
X-Mailer: git-send-email 1.7.0.7
Subject: [dpdk-dev] [PATCH] malloc: fix memset size
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: Fri, 29 Mar 2019 10:56:18 -0000

The memset size for an IPC message is set incorrectly. Fix it to
cover the entire IPC message.

Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/malloc_mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
index f3a13353b..b470565e0 100644
--- a/lib/librte_eal/common/malloc_mp.c
+++ b/lib/librte_eal/common/malloc_mp.c
@@ -501,7 +501,7 @@ handle_rollback_response(const struct rte_mp_msg *request,
 	/* lock the request */
 	pthread_mutex_lock(&mp_request_list.lock);
 
-	memset(&msg, 0, sizeof(0));
+	memset(&msg, 0, sizeof(msg));
 
 	entry = find_request_by_id(mpreq->id);
 	if (entry == NULL) {
-- 
2.17.1

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 9C001A05D3
	for <public@inbox.dpdk.org>; Fri, 29 Mar 2019 11:56:19 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 4F90F2BD3;
	Fri, 29 Mar 2019 11:56:19 +0100 (CET)
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id F32302965;
 Fri, 29 Mar 2019 11:56:17 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 29 Mar 2019 03:56:17 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,284,1549958400"; d="scan'208";a="331844226"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by fmsmga006.fm.intel.com with ESMTP; 29 Mar 2019 03:56:16 -0700
Received: from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com [10.243.17.64])
 by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id
 x2TAuFsK017469; Fri, 29 Mar 2019 10:56:15 GMT
Received: from sivswdev05.ir.intel.com (localhost [127.0.0.1])
 by sivswdev05.ir.intel.com with ESMTP id x2TAuF2g001182;
 Fri, 29 Mar 2019 10:56:15 GMT
Received: (from aburakov@localhost)
 by sivswdev05.ir.intel.com with LOCAL id x2TAuFKv001178;
 Fri, 29 Mar 2019 10:56:15 GMT
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org
Date: Fri, 29 Mar 2019 10:56:15 +0000
Message-Id:
 <8f8c3997f0cd872487482607b2925ab9b05ca7d1.1553856935.git.anatoly.burakov@intel.com>
X-Mailer: git-send-email 1.7.0.7
Subject: [dpdk-dev] [PATCH] malloc: fix memset size
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: <20190329105615.vutAuKr6AtQWpYaWYSPRgai0UAGnPvrpAA7IehlXL1w@z>

The memset size for an IPC message is set incorrectly. Fix it to
cover the entire IPC message.

Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/malloc_mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
index f3a13353b..b470565e0 100644
--- a/lib/librte_eal/common/malloc_mp.c
+++ b/lib/librte_eal/common/malloc_mp.c
@@ -501,7 +501,7 @@ handle_rollback_response(const struct rte_mp_msg *request,
 	/* lock the request */
 	pthread_mutex_lock(&mp_request_list.lock);
 
-	memset(&msg, 0, sizeof(0));
+	memset(&msg, 0, sizeof(msg));
 
 	entry = find_request_by_id(mpreq->id);
 	if (entry == NULL) {
-- 
2.17.1