summaryrefslogtreecommitdiff
path: root/page_cache.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2014-02-13 19:44:45 +0000
committerJuan Quintela <quintela@redhat.com>2014-02-25 14:30:28 +0100
commit6d3cb1f970ee85361618f7ff02869180394e012d (patch)
treeba96f77f01344e8efc15eea039358fc4f3bbe719 /page_cache.c
parent24a370ef2351dc596a7e47508b952ddfba79ef94 (diff)
downloadqemu-6d3cb1f970ee85361618f7ff02869180394e012d.tar.gz
Fix two XBZRLE corruption issues
Push zero'd pages into the XBZRLE cache A page that was cached by XBZRLE, zero'd and then XBZRLE'd again was being compared against a stale cache value Don't use 'qemu_put_buffer_async' to put pages from the XBZRLE cache Since the cache might change before the data hits the wire Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'page_cache.c')
-rw-r--r--page_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/page_cache.c b/page_cache.c
index 3ef6ee7ad2..b033681a93 100644
--- a/page_cache.c
+++ b/page_cache.c
@@ -150,7 +150,7 @@ uint8_t *get_cached_data(const PageCache *cache, uint64_t addr)
return cache_get_by_addr(cache, addr)->it_data;
}
-int cache_insert(PageCache *cache, uint64_t addr, uint8_t *pdata)
+int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata)
{
CacheItem *it = NULL;