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
This commit is contained in:
parent
1251a82da6
commit
f8c8b2e8a0
@ -259,7 +259,7 @@ kern_mmap(struct thread *td, uintptr_t addr0, size_t len, int prot, int flags,
|
||||
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user