summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2016-09-16 14:34:07 -0700
committerDmitry Shmidt <dimitrysh@google.com>2016-09-16 14:34:07 -0700
commita517d900c6b4996dd6a6ba2f600dabe1c4da717a (patch)
treeceb85027033fa99487deb1da5e8fa5ddddb92823 /mm
parent441e10ac4ca3a476d76091a1bd250ac4ff7306c5 (diff)
parent1d074db69c46d62ce82b331c2080e2fcb710bf4a (diff)
Merge tag 'v4.4.21' into android-4.4.y
This is the 4.4.21 stable release Change-Id: I03e47d6fdca8084641c4b4f9658ea0b0edb8f297
Diffstat (limited to 'mm')
-rw-r--r--mm/util.c27
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)
{