mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Michael Ellerman <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6347e8d5bc
commit
f307ab6dce
17 changed files with 84 additions and 54 deletions
|
|
@ -624,7 +624,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
|
|||
if (len > buflen)
|
||||
len = buflen;
|
||||
|
||||
res = access_process_vm(task, arg_start, buffer, len, 0);
|
||||
res = access_process_vm(task, arg_start, buffer, len, FOLL_FORCE);
|
||||
|
||||
/*
|
||||
* If the nul at the end of args has been overwritten, then
|
||||
|
|
@ -639,7 +639,8 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
|
|||
if (len > buflen - res)
|
||||
len = buflen - res;
|
||||
res += access_process_vm(task, env_start,
|
||||
buffer+res, len, 0);
|
||||
buffer+res, len,
|
||||
FOLL_FORCE);
|
||||
res = strnlen(buffer, res);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue