Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 152d2e1d authored by Hareesh Gundu's avatar Hareesh Gundu Committed by Gerrit - the friendly Code Review server
Browse files

ion: Correct argument of Set/ClearPagePrivate of secure CMA



On each sg of secure CMA buffer to set/clear page private bit,
we should use the sg_page(sg) rather than sg_page(sgt->sgl).

Change-Id: I05300d9d3a0931d2a0c113f945b45136e0dea01e
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 776b2e1b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -262,7 +262,7 @@ static void ion_secure_cma_free(struct ion_buffer *buffer)
	}
	}


	for_each_sg(sgt->sgl, sg, sgt->nents, i)
	for_each_sg(sgt->sgl, sg, sgt->nents, i)
		ClearPagePrivate(sg_page(sgt->sgl));
		ClearPagePrivate(sg_page(sg));


	ion_cma_free(buffer);
	ion_cma_free(buffer);
}
}
@@ -303,7 +303,7 @@ static int ion_secure_cma_allocate(struct ion_heap *heap,


	/* Set the private bit to indicate that we've secured this */
	/* Set the private bit to indicate that we've secured this */
	for_each_sg(sgt->sgl, sg, sgt->nents, i)
	for_each_sg(sgt->sgl, sg, sgt->nents, i)
		SetPagePrivate(sg_page(sgt->sgl));
		SetPagePrivate(sg_page(sg));


	return ret;
	return ret;