mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
ANDROID: fix up direct access to mmap_sem
It's now being abstracted away, so fix up the ANDROID specific code that touches the lock to use the correct functions instead. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I9cedb62118cd1bba7af27deb11499d312d24d7fc
This commit is contained in:
parent
3203312829
commit
1da58ab555
|
|
@ -136,7 +136,7 @@ static void get_full_task_comm(struct task_entry *task_entry,
|
|||
|
||||
/* next the executable file name */
|
||||
if (mm) {
|
||||
down_read(&mm->mmap_sem);
|
||||
mmap_write_lock(mm);
|
||||
if (mm->exe_file) {
|
||||
char *pathname = d_path(&mm->exe_file->f_path, buf,
|
||||
unused_len);
|
||||
|
|
@ -149,7 +149,7 @@ static void get_full_task_comm(struct task_entry *task_entry,
|
|||
unused_len--;
|
||||
}
|
||||
}
|
||||
up_read(&mm->mmap_sem);
|
||||
mmap_write_unlock(mm);
|
||||
}
|
||||
unused_len -= len;
|
||||
|
||||
|
|
|
|||
|
|
@ -2361,7 +2361,7 @@ static int prctl_set_vma_anon_name(unsigned long start, unsigned long end,
|
|||
return error;
|
||||
if (prev)
|
||||
vma = prev->vm_next;
|
||||
else /* madvise_remove dropped mmap_sem */
|
||||
else /* madvise_remove dropped mmap_lock */
|
||||
vma = find_vma(current->mm, start);
|
||||
}
|
||||
}
|
||||
|
|
@ -2389,7 +2389,7 @@ static int prctl_set_vma(unsigned long opt, unsigned long start,
|
|||
if (end == start)
|
||||
return 0;
|
||||
|
||||
down_write(&mm->mmap_sem);
|
||||
mmap_write_lock(mm);
|
||||
|
||||
switch (opt) {
|
||||
case PR_SET_VMA_ANON_NAME:
|
||||
|
|
@ -2399,7 +2399,7 @@ static int prctl_set_vma(unsigned long opt, unsigned long start,
|
|||
error = -EINVAL;
|
||||
}
|
||||
|
||||
up_write(&mm->mmap_sem);
|
||||
mmap_write_unlock(mm);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user