Permalink
Browse files

OS-5252 lx brand: mremap() can fail spuriously with ENOMEM

Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
  • Loading branch information...
bcantrill committed Mar 16, 2016
1 parent 644273d commit 28e4c4c84ee16378fb117d071af1fb819696b1ea
Showing with 2 additions and 2 deletions.
  1. +2 −2 usr/src/lib/brand/lx/lx_brand/common/mem.c
@@ -21,7 +21,7 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2015 Joyent, Inc.
* Copyright 2016 Joyent, Inc.
*/
#include <errno.h>
@@ -544,7 +544,7 @@ lx_remap_anon(prmap_t *map, prmap_t *maps, int nmap,
* and our hint.
*/
for (i = 0; i < nmap; i++) {
if (maps[i].pr_vaddr < (uintptr_t)(1 << 3UL))
if (maps[i].pr_vaddr < (uintptr_t)(1 << 31UL))
continue;
hint = (void *)(maps[i].pr_vaddr - (new_size << 4UL));

0 comments on commit 28e4c4c

Please sign in to comment.