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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user