ion: Restore secure system heap buffers' heap pointer after being freed
When a secure system heap buffer is freed, the buffer's heap pointer
is changed to the system heap, so that the buffer's pages can be freed
into the secure pools properly. However, the buffer's heap pointer
is not reset back to the secure system heap after the buffer has been
freed.
This is problematic, as the ION buffer tracking code uses the buffer's
heap pointer to figure out which heap's memory accounting stats it has
to decrement when a buffer is freed. In this case, we end up not
decrementing the system secure heap's memory accounting stats, but
instead, decrement the system heap's accounting stats, which is not
correct.
After freeing a buffer's pages, restore the buffer's heap pointer to
the secure system heap, to ensure that the correct heap's accounting
stats are adjusted.
Change-Id: I4ade80660fb5585a2be93be4929db5c534351c2d
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment