diff options
Diffstat (limited to 'tools/virtio')
| -rw-r--r-- | tools/virtio/vringh_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index b9591223437a..5ea6d29bc992 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vringh_test.c @@ -159,7 +159,12 @@ static int parallel_test(u64 features, /* Parent and child use separate addresses, to check our mapping logic! */ host_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + if (host_map == MAP_FAILED) + err(1, "mmap host_map"); + guest_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + if (guest_map == MAP_FAILED) + err(1, "mmap guest_map"); pipe_ret = pipe(to_guest); assert(!pipe_ret); |
