aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/mmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index edceaca4a8..048c4135af 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -894,6 +894,9 @@ abi_long target_madvise(abi_ulong start, abi_ulong len_in, int advice)
if (advice == MADV_DONTNEED &&
can_passthrough_madv_dontneed(start, end)) {
ret = get_errno(madvise(g2h_untagged(start), len, MADV_DONTNEED));
+ if (ret == 0) {
+ page_reset_target_data(start, start + len);
+ }
}
mmap_unlock();