ion: Check for valid vmids for msm system heap
Add a check for valid vmids before doing an allocation
for msm system heap. This check does a hyp_assign on a
page, stores the vmids and mark them as valid or invalid
based on hyp_assign result. If vmid is invalid it returns
or if its valid then proceeds with the allocation. So, this
prevents ion pages leak in cases where hyp_assign fails.
Also add a check for ion_hyp_assign_sg return value to
prevent leak.
Change-Id: Ibbc150490daf69d27b36db0e45a3c58496e6b9bd
Signed-off-by:
Vijayanand Jitta <vjitta@codeaurora.org>
Loading
Please register or sign in to comment