DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org
Subject: [dpdk-dev] [PATCH] malloc: fix memset size
Date: Fri, 29 Mar 2019 10:56:15 +0000	[thread overview]
Message-ID: <8f8c3997f0cd872487482607b2925ab9b05ca7d1.1553856935.git.anatoly.burakov@intel.com> (raw)

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

             reply	other threads:[~2019-03-29 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 10:56 Anatoly Burakov [this message]
2019-03-29 10:56 ` Anatoly Burakov
2019-03-29 11:52 ` Thomas Monjalon
2019-03-29 11:52   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f8c3997f0cd872487482607b2925ab9b05ca7d1.1553856935.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).