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

Commit d8d879b5 authored by Puranam V G Tejaswi's avatar Puranam V G Tejaswi
Browse files

msm: kgsl: set vm_pgoff of vma to zero



kgsl gets the entry id or the gpu address through vm_pgoff. It is used
during mmap and never needed again. But this pgoff has different meaning
at other parts of kernel. Not setting to zero will let way for wrong
assumption when tried to unmap a page from the vma.

Change-Id: Ia81c64a77456caf168c6bd23bdf5755c3f3ee31c
Signed-off-by: default avatarPuranam V G Tejaswi <pvgtejas@codeaurora.org>
parent a1fe213f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4879,6 +4879,15 @@ static int kgsl_mmap(struct file *file, struct vm_area_struct *vma)

	entry->memdesc.useraddr = vma->vm_start;

	/*
	 * kgsl gets the entry id or the gpu address through vm_pgoff.
	 * It is used during mmap and never needed again. But this vm_pgoff
	 * has different meaning at other parts of kernel. Not setting to
	 * zero will let way for wrong assumption when tried to unmap a page
	 * from this vma.
	 */
	vma->vm_pgoff = 0;

	trace_kgsl_mem_mmap(entry);
	return 0;
}