From: Michael McConville <mmcco@mykolab.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mmap(2) returns MAP_FAILED, not NULL, on failure
Date: Thu, 30 Nov 2017 23:51:13 -0700 [thread overview]
Message-ID: <24F37CB2-A34A-472D-88DF-3E27E0E98F78@mykolab.com> (raw)
Signed-off-by: Michael McConville <mmcco@mykolab.com>
---
lib/librte_eal/bsdapp/eal/eal_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
index 6ba058578..2c8a4b592 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
@@ -155,7 +155,7 @@ rte_eal_hugepage_attach(void)
/* Map the shared hugepage_info into the process address spaces */
hpi = mmap(NULL, sizeof(struct hugepage_info), PROT_READ, MAP_PRIVATE,
fd_hugepage_info, 0);
- if (hpi == NULL) {
+ if (hpi == MAP_FAILED) {
RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path());
goto error;
}
--
2.15.1
next reply other threads:[~2017-12-01 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 6:51 Michael McConville [this message]
2017-12-02 0:50 ` Ferruh Yigit
2017-12-02 0:51 ` Ferruh Yigit
2018-01-09 16:03 ` Thomas Monjalon
2017-12-02 0:54 ` Ferruh Yigit
2017-12-04 7:32 ` Matej Vido
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=24F37CB2-A34A-472D-88DF-3E27E0E98F78@mykolab.com \
--to=mmcco@mykolab.com \
--cc=dev@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).