Commit 24866eef authored by Dhivya Subramanian's avatar Dhivya Subramanian
Browse files

msm: kgsl: Don't change the sglen of the memdesc if allocation fails



If the page_alloc loop fails, we changed the length of the scatterlist
for the memdesc to the last good page so we could have an efficient
loop through kgsl_sharedmem_free.  Unfortunately, we were also using
the sglen to decide between using kmem or vmalloc memory for the sg
list in the first place. There is a chance that one could start out
with a large sg list from vmalloc, but if it failed early, then we
could truncate the size and attempt to kfree it.

Zero the stlist at init time and use a length == 0 as an indicator
that the list might be truncated.
CRs-Fixed: 443441

Change-Id: Ib48a08c69a7bbfc69b92f09e83fc80f9bdedffe0
Signed-off-by: default avatarDhivya Subramanian <dthiru@codeaurora.org>
parent aeffb9de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment