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

Commit be7c7b2c authored by Yajun Li's avatar Yajun Li Committed by Gerrit - the friendly Code Review server
Browse files

soc: hab: fix mmap failure issue when hab import



If hab client import the same buffer with different
size, only checking pages_list->index is not enough,
so add the buffer size checking.

Change-Id: I92d16d124e69131cee9b81a49dc9fa02075a96b6
Signed-off-by: default avatarYajun Li <yajunl@codeaurora.org>
parent 7c445f53
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -738,7 +738,8 @@ int habmem_imp_hyp_mmap(struct file *filp, struct vm_area_struct *vma)

	read_lock(&imp_ctx->implist_lock);
	list_for_each_entry(pglist, &imp_ctx->imp_list, list) {
		if (pglist->index == vma->vm_pgoff) {
		if ((pglist->index == vma->vm_pgoff) &&
			((length <= pglist->npages * PAGE_SIZE))) {
			bfound = 1;
			break;
		}