Author: dougm
Date: Mon Jun 10 22:06:40 2019
New Revision: 348883
URL: https://svnweb.freebsd.org/changeset/base/348883

Log:
  r348879 introduced a wrong-way comparison that broke mmap.
  This change rights that comparison.
  
  Reported by: pho
  Approved by: markj (mentor)
  MFC after: 3 days
  Differential Revision: https://reviews.freebsd.org/D20595

Modified:
  head/sys/vm/vm_mmap.c

Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c       Mon Jun 10 21:50:07 2019        (r348882)
+++ head/sys/vm/vm_mmap.c       Mon Jun 10 22:06:40 2019        (r348883)
@@ -259,7 +259,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t l
        size = len + pageoff;                   /* low end... */
        size = round_page(size);                /* hi end */
        /* Check for rounding up to zero. */
-       if (len < size)
+       if (len > size)
                return (ENOMEM);
 
        /* Ensure alignment is at least a page and fits in a pointer. */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to