diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-09-20 15:18:54 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-09-20 15:18:54 +0800 |
commit | 5f87c475f82a75e10bc6e249b7471349f1ef1636 (patch) | |
tree | df697b570c923c722b5ba24f502c6abdbb5e05f1 /mm/util.c | |
parent | d3a1d035ef89cfb89cf6e2128d44b95771f2c7b4 (diff) | |
parent | d2d693d1ba7d93ec7c5db8aca2da29a4c91f6782 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Conflicts:
in fs/proc/task_mmu.c:
looks like vma_get_anon_name() want have a name for anonymous
vma when there is no name used in vma. commit: 586278d78bf
The name show is after any other names, so it maybe covered.
but anyway, it just a show here.
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/mm/util.c b/mm/util.c index 9af1c12b310c..d5259b62f8d7 100644 --- a/mm/util.c +++ b/mm/util.c @@ -199,36 +199,11 @@ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma, } /* Check if the vma is being used as a stack by this task */ -static int vm_is_stack_for_task(struct task_struct *t, - struct vm_area_struct *vma) +int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t) { return (vma->vm_start <= KSTK_ESP(t) && vma->vm_end >= KSTK_ESP(t)); } -/* - * Check if the vma is being used as a stack. - * If is_group is non-zero, check in the entire thread group or else - * just check in the current task. Returns the task_struct of the task - * that the vma is stack for. Must be called under rcu_read_lock(). - */ -struct task_struct *task_of_stack(struct task_struct *task, - struct vm_area_struct *vma, bool in_group) -{ - if (vm_is_stack_for_task(task, vma)) - return task; - - if (in_group) { - struct task_struct *t; - - for_each_thread(task, t) { - if (vm_is_stack_for_task(t, vma)) - return t; - } - } - - return NULL; -} - #if defined(CONFIG_MMU) && !defined(HAVE_ARCH_PICK_MMAP_LAYOUT) void arch_pick_mmap_layout(struct mm_struct *mm) { |