ion: invalidate buffers before zero'ing
Currently, we invalidate the cache for buffers being zero'd *after* we
zero them. However, this is racey since a dirty cache line from an
earlier mapping could be written out to memory between the zero'ing and
the invalidation. Fix this by invalidating the cache *before* zero'ing
the buffer.
Before this change, I was seeing corruption with:
$ cat <<EOF | ./memory_prof -e -i -
simple_alloc,1,ION_SYSTEM_HEAP_ID,ION_FLAG_CACHED,0x100000,1MB
simple_basic_sanity,1
simple_profile,1
simple_free,1
EOF
After this change, no corruption.
Change-Id: I1f2603604efc9be4ebf9112b06728e0aeca60ea0
Signed-off-by:
Mitchel Humpherys <mitchelh@codeaurora.org>
Loading
Please register or sign in to comment