ion: Fix two small issues in system_heap allocation
In testing ion system heap allocations, I ran across two issues: 1) Not k*z*allocing the sg table. This can cause trouble if we end up trying call sg_alloc_table() with too many entries, then sg_alloc_table() internally fails and tries to free what it thinks is internal table structure, which causes bad pointer traversals. 2) The second list_for_each_entry probably should be _safe, since I was seeing strange lock warnings and oopses on occasion. This seems to resolve it, but could use some extra checking. Change-Id: I59d4c90104a8cf23dc4ae814d0b17348f1b68ac0 Signed-off-by:John Stultz <john.stultz@linaro.org> Git-commit: 818017a0caa6b7b3bb6e96697a2c35806e08f6a4 Git-repo: http://android.googlesource.com/kernel/common/ [mitchelh@codeaurora.org: we already had list_for_each_entry_safe from the commit (fb98460f: "gpu: ion: Use list_for_each_safe on error path")] Signed-off-by:
Mitchel Humpherys <mitchelh@codeaurora.org>
Loading
Please register or sign in to comment