.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * arch/sh/kernel/vsyscall/vsyscall.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * vDSO randomization |
---|
7 | 8 | * Copyright(C) 2005-2006, Red Hat, Inc., Ingo Molnar |
---|
8 | | - * |
---|
9 | | - * This file is subject to the terms and conditions of the GNU General Public |
---|
10 | | - * License. See the file "COPYING" in the main directory of this archive |
---|
11 | | - * for more details. |
---|
12 | 9 | */ |
---|
13 | 10 | #include <linux/mm.h> |
---|
14 | 11 | #include <linux/kernel.h> |
---|
.. | .. |
---|
64 | 61 | unsigned long addr; |
---|
65 | 62 | int ret; |
---|
66 | 63 | |
---|
67 | | - if (down_write_killable(&mm->mmap_sem)) |
---|
| 64 | + if (mmap_write_lock_killable(mm)) |
---|
68 | 65 | return -EINTR; |
---|
69 | 66 | |
---|
70 | 67 | addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0); |
---|
.. | .. |
---|
83 | 80 | current->mm->context.vdso = (void *)addr; |
---|
84 | 81 | |
---|
85 | 82 | up_fail: |
---|
86 | | - up_write(&mm->mmap_sem); |
---|
| 83 | + mmap_write_unlock(mm); |
---|
87 | 84 | return ret; |
---|
88 | 85 | } |
---|
89 | 86 | |
---|