* mmap.cc (msync): Disable rounding up len. Fix bug in access check
loop.
This commit is contained in:
parent
ef4954b62d
commit
add2f65f37
|
@ -1,3 +1,8 @@
|
|||
2006-07-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mmap.cc (msync): Disable rounding up len. Fix bug in access check
|
||||
loop.
|
||||
|
||||
2006-07-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (symlink_worker): Return EEXIST if newpath exists.
|
||||
|
|
|
@ -1352,7 +1352,9 @@ msync (void *addr, size_t len, int flags)
|
|||
set_errno (EINVAL);
|
||||
goto out;
|
||||
}
|
||||
#if 0 /* If I only knew why I did that... */
|
||||
len = roundup2 (len, pagesize);
|
||||
#endif
|
||||
|
||||
/* Iterate through the map, looking for the mmapped area.
|
||||
Error if not found. */
|
||||
|
@ -1368,7 +1370,7 @@ msync (void *addr, size_t len, int flags)
|
|||
if (rec->access ((caddr_t)addr))
|
||||
{
|
||||
/* Check whole area given by len. */
|
||||
for (DWORD i = getpagesize (); i < len; ++i)
|
||||
for (DWORD i = getpagesize (); i < len; i += getpagesize ())
|
||||
if (!rec->access ((caddr_t)addr + i))
|
||||
{
|
||||
set_errno (ENOMEM);
|
||||
|
|
Loading…
Reference in New Issue