diff options
author | Lorenzo Stoakes <lstoakes@gmail.com> | 2016-10-12 20:20:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-19 11:31:25 -0400 |
commit | f307ab6dcea03f9d8e4d70508fd7d1ca57cfa7f9 (patch) | |
tree | 94a96ebae9957cf1252231a69f8904796aa2563e /arch/cris/arch-v32 | |
parent | 6347e8d5bcce33fc36e651901efefbe2c93a43ef (diff) |
mm: replace access_process_vm() write parameter with gup_flags
This removes the 'write' argument from access_process_vm() and replaces
it with 'gup_flags' as use of this function previously silently implied
FOLL_FORCE, whereas after this patch callers explicitly pass this flag.
We make this explicit as use of FOLL_FORCE can result in surprising
behaviour (and hence bugs) within the mm subsystem.
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r-- | arch/cris/arch-v32/kernel/ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index f085229cf870..f0df654ac6fc 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c | |||
@@ -147,7 +147,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
147 | /* The trampoline page is globally mapped, no page table to traverse.*/ | 147 | /* The trampoline page is globally mapped, no page table to traverse.*/ |
148 | tmp = *(unsigned long*)addr; | 148 | tmp = *(unsigned long*)addr; |
149 | } else { | 149 | } else { |
150 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 150 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), FOLL_FORCE); |
151 | 151 | ||
152 | if (copied != sizeof(tmp)) | 152 | if (copied != sizeof(tmp)) |
153 | break; | 153 | break; |
@@ -279,7 +279,7 @@ static int insn_size(struct task_struct *child, unsigned long pc) | |||
279 | int opsize = 0; | 279 | int opsize = 0; |
280 | 280 | ||
281 | /* Read the opcode at pc (do what PTRACE_PEEKTEXT would do). */ | 281 | /* Read the opcode at pc (do what PTRACE_PEEKTEXT would do). */ |
282 | copied = access_process_vm(child, pc, &opcode, sizeof(opcode), 0); | 282 | copied = access_process_vm(child, pc, &opcode, sizeof(opcode), FOLL_FORCE); |
283 | if (copied != sizeof(opcode)) | 283 | if (copied != sizeof(opcode)) |
284 | return 0; | 284 | return 0; |
285 | 285 | ||