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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348883
@ -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…
Reference in New Issue
Block a user