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

Commit c8fb15a4 authored by Hareesh Gundu's avatar Hareesh Gundu
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 89d42a92
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ static void ion_secure_cma_free(struct ion_buffer *buffer)
	}

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

	ion_cma_free(buffer);
out_free_source:
@@ -345,7 +345,7 @@ static int ion_secure_cma_allocate(

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

	kfree(dest_vm_list);
	kfree(dest_perms);