All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Yang <phil.yang@arm.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com, jianbo.liu@arm.com,
	herbert.guan@arm.com, phil.yang@arm.com
Subject: [PATCH 2/2] test/memzone: Fix test_memzone_free issue
Date: Mon, 15 Jan 2018 13:43:33 +0800	[thread overview]
Message-ID: <1515995013-5748-3-git-send-email-phil.yang@arm.com> (raw)
In-Reply-To: <1515995013-5748-1-git-send-email-phil.yang@arm.com>

When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the counter's
memory and lead to mz[] memory cannot be freed.

Fixd by extend to mz[RTE_MAX_MEMZONE + 1].

Signed-off-by: Phil Yang <phil.yang@arm.com>
---
 test/test/test_memzone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 9c20172..24e29a7 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -742,7 +742,7 @@ test_memzone_bounded(void)
 static int
 test_memzone_free(void)
 {
-	const struct rte_memzone *mz[RTE_MAX_MEMZONE];
+	const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
 	int i;
 	char name[20];
 
-- 
2.7.4

  parent reply	other threads:[~2018-01-15  5:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  9:41 [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues Phil Yang
2018-01-12  5:46 ` Jianbo Liu
2018-01-12 17:43 ` Burakov, Anatoly
2018-01-15  5:57   ` Phil Yang
2018-01-15  5:43 ` [PATCH 0/2] Fix memzone autotest issues Phil Yang
2018-01-15  5:43   ` [PATCH 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
2018-01-15  5:43   ` Phil Yang [this message]
2018-01-17 23:41   ` [PATCH 0/2] Fix memzone autotest issues Thomas Monjalon
2018-01-15  5:52 ` [PATCH v2 " Phil Yang
2018-01-15  5:52   ` [PATCH v2 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
2018-01-15  9:48     ` Burakov, Anatoly
2018-01-15  5:52   ` [PATCH v2 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
2018-01-15  9:49     ` Burakov, Anatoly

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=1515995013-5748-3-git-send-email-phil.yang@arm.com \
    --to=phil.yang@arm.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=herbert.guan@arm.com \
    --cc=jianbo.liu@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.