[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen stable-4.11] mmap(2) returns MAP_FAILED, not NULL, on failure



commit a35ed1444329599f2975512c82be795f8af284d5
Author:     Michael McConville <mmcco@xxxxxxxxxxx>
AuthorDate: Fri Dec 1 11:31:57 2017 -0700
Commit:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Mon Mar 25 17:08:00 2019 +0000

    mmap(2) returns MAP_FAILED, not NULL, on failure
    
    Signed-off-by: Michael McConville <mmcco@xxxxxxxxxxx>
    Reviewed-by: John Snow <jsnow@xxxxxxxxxx>
    Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx>
    (cherry picked from commit ab1ce9bd4897b9909836e2d50bca86f2f3f2dddc)
---
 hw/i386/xen/xen-mapcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c
index baab93b614..efa35dc6e0 100644
--- a/hw/i386/xen/xen-mapcache.c
+++ b/hw/i386/xen/xen-mapcache.c
@@ -199,7 +199,7 @@ static void xen_remap_bucket(MapCacheEntry *entry,
          */
         vaddr_base = mmap(vaddr, size, PROT_READ | PROT_WRITE,
                           MAP_ANON | MAP_SHARED, -1, 0);
-        if (vaddr_base == NULL) {
+        if (vaddr_base == MAP_FAILED) {
             perror("mmap");
             exit(-1);
         }
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#stable-4.11

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.