diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-10-03 19:21:08 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-10-03 19:21:08 -0700 |
| commit | ca7c7c4784c710016515017898556a80b1fa2ad7 (patch) | |
| tree | 2f53c0b4b007b5ed5902c7f51905da2583049827 | |
| parent | c40d5678db2462299496731bfc44c63c467a3db0 (diff) | |
| parent | be7c7b2c0c1ee130615b97282b2ae95ac06e88fb (diff) | |
Merge "soc: hab: fix mmap failure issue when hab import"
| -rw-r--r-- | drivers/soc/qcom/hab/hab_mem_linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/soc/qcom/hab/hab_mem_linux.c b/drivers/soc/qcom/hab/hab_mem_linux.c index 428d3e7cee60..5ad945d078c9 100644 --- a/drivers/soc/qcom/hab/hab_mem_linux.c +++ b/drivers/soc/qcom/hab/hab_mem_linux.c @@ -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; } |
