Merge 80aaf7bb64 on remote branch
Change-Id: I41009f631657fc9f605e8eb1d9f9d69580cf1883
This commit is contained in:
@@ -3153,6 +3153,30 @@ static int qseecom_prepare_unload_app(struct qseecom_dev_handle *data)
|
|||||||
pr_debug("prepare to unload app(%d)(%s), pending %d\n",
|
pr_debug("prepare to unload app(%d)(%s), pending %d\n",
|
||||||
data->client.app_id, data->client.app_name,
|
data->client.app_id, data->client.app_name,
|
||||||
data->client.unload_pending);
|
data->client.unload_pending);
|
||||||
|
|
||||||
|
/* For keymaster we are not going to unload so no need to add it in
|
||||||
|
* unload app pending list as soon as we identify release ion buffer
|
||||||
|
* and return .
|
||||||
|
*/
|
||||||
|
if (!memcmp(data->client.app_name, "keymaste", strlen("keymaste"))) {
|
||||||
|
if (data->client.dmabuf) {
|
||||||
|
/* Each client will get same KM TA loaded handle but
|
||||||
|
* will allocate separate shared buffer during
|
||||||
|
* loading of TA, as client can't unload KM TA so we
|
||||||
|
* will only free out shared buffer and return early
|
||||||
|
* to avoid any ion buffer leak.
|
||||||
|
*/
|
||||||
|
qseecom_vaddr_unmap(data->client.sb_virt,
|
||||||
|
data->client.sgt, data->client.attach,
|
||||||
|
data->client.dmabuf);
|
||||||
|
MAKE_NULL(data->client.sgt,
|
||||||
|
data->client.attach, data->client.dmabuf);
|
||||||
|
}
|
||||||
|
__qseecom_free_tzbuf(&data->sglistinfo_shm);
|
||||||
|
data->released = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (data->client.unload_pending)
|
if (data->client.unload_pending)
|
||||||
return 0;
|
return 0;
|
||||||
entry = kzalloc(sizeof(*entry), GFP_KERNEL);
|
entry = kzalloc(sizeof(*entry), GFP_KERNEL);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ enum ipa_fltrt_equations {
|
|||||||
#define IPA3_0_HW_TBL_ADDR_MASK (127)
|
#define IPA3_0_HW_TBL_ADDR_MASK (127)
|
||||||
#define IPA3_0_HW_RULE_BUF_SIZE (256)
|
#define IPA3_0_HW_RULE_BUF_SIZE (256)
|
||||||
#define IPA3_0_HW_RULE_START_ALIGNMENT (7)
|
#define IPA3_0_HW_RULE_START_ALIGNMENT (7)
|
||||||
#define IPA3_0_HW_RULE_PREFETCH_BUF_SIZE (128)
|
#define IPA3_0_HW_RULE_PREFETCH_BUF_SIZE (256)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
17
fs/exec.c
17
fs/exec.c
@@ -1805,6 +1805,9 @@ static int __do_execve_file(int fd, struct filename *filename,
|
|||||||
goto out_unmark;
|
goto out_unmark;
|
||||||
|
|
||||||
bprm->argc = count(argv, MAX_ARG_STRINGS);
|
bprm->argc = count(argv, MAX_ARG_STRINGS);
|
||||||
|
if (bprm->argc == 0)
|
||||||
|
pr_warn_once("process '%s' launched '%s' with NULL argv: empty string added\n",
|
||||||
|
current->comm, bprm->filename);
|
||||||
if ((retval = bprm->argc) < 0)
|
if ((retval = bprm->argc) < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -1829,6 +1832,20 @@ static int __do_execve_file(int fd, struct filename *filename,
|
|||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When argv is empty, add an empty string ("") as argv[0] to
|
||||||
|
* ensure confused userspace programs that start processing
|
||||||
|
* from argv[1] won't end up walking envp. See also
|
||||||
|
* bprm_stack_limits().
|
||||||
|
*/
|
||||||
|
if (bprm->argc == 0) {
|
||||||
|
const char *argv[] = { "", NULL };
|
||||||
|
retval = copy_strings_kernel(1, argv, bprm);
|
||||||
|
if (retval < 0)
|
||||||
|
goto out;
|
||||||
|
bprm->argc = 1;
|
||||||
|
}
|
||||||
|
|
||||||
retval = exec_binprm(bprm);
|
retval = exec_binprm(bprm);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
14
mm/mmap.c
14
mm/mmap.c
@@ -3178,10 +3178,9 @@ void exit_mmap(struct mm_struct *mm)
|
|||||||
(void)__oom_reap_task_mm(mm);
|
(void)__oom_reap_task_mm(mm);
|
||||||
|
|
||||||
set_bit(MMF_OOM_SKIP, &mm->flags);
|
set_bit(MMF_OOM_SKIP, &mm->flags);
|
||||||
down_write(&mm->mmap_sem);
|
|
||||||
up_write(&mm->mmap_sem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
down_write(&mm->mmap_sem);
|
||||||
if (mm->locked_vm) {
|
if (mm->locked_vm) {
|
||||||
vma = mm->mmap;
|
vma = mm->mmap;
|
||||||
while (vma) {
|
while (vma) {
|
||||||
@@ -3194,8 +3193,11 @@ void exit_mmap(struct mm_struct *mm)
|
|||||||
arch_exit_mmap(mm);
|
arch_exit_mmap(mm);
|
||||||
|
|
||||||
vma = mm->mmap;
|
vma = mm->mmap;
|
||||||
if (!vma) /* Can happen if dup_mmap() received an OOM */
|
if (!vma) {
|
||||||
|
/* Can happen if dup_mmap() received an OOM */
|
||||||
|
up_write(&mm->mmap_sem);;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lru_add_drain();
|
lru_add_drain();
|
||||||
flush_cache_mm(mm);
|
flush_cache_mm(mm);
|
||||||
@@ -3206,16 +3208,14 @@ void exit_mmap(struct mm_struct *mm)
|
|||||||
free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING);
|
free_pgtables(&tlb, vma, FIRST_USER_ADDRESS, USER_PGTABLES_CEILING);
|
||||||
tlb_finish_mmu(&tlb, 0, -1);
|
tlb_finish_mmu(&tlb, 0, -1);
|
||||||
|
|
||||||
/*
|
/* Walk the list again, actually closing and freeing it. */
|
||||||
* Walk the list again, actually closing and freeing it,
|
|
||||||
* with preemption enabled, without holding any MM locks.
|
|
||||||
*/
|
|
||||||
while (vma) {
|
while (vma) {
|
||||||
if (vma->vm_flags & VM_ACCOUNT)
|
if (vma->vm_flags & VM_ACCOUNT)
|
||||||
nr_accounted += vma_pages(vma);
|
nr_accounted += vma_pages(vma);
|
||||||
vma = remove_vma(vma);
|
vma = remove_vma(vma);
|
||||||
cond_resched();
|
cond_resched();
|
||||||
}
|
}
|
||||||
|
up_write(&mm->mmap_sem);
|
||||||
vm_unacct_memory(nr_accounted);
|
vm_unacct_memory(nr_accounted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user