diff options
author | Lorenzo Stoakes <lstoakes@gmail.com> | 2016-10-13 03:20:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-17 23:55:16 +0300 |
commit | 2b29980eb75bc7dcb23ed0436fe805ac6e684542 (patch) | |
tree | d88fce1140a7d2fd22fa268abf2c3d80bfd26b9b /virt | |
parent | ff099ed77421a5dc8206bb61e5a598b28ab39ebb (diff) | |
download | linux-2b29980eb75bc7dcb23ed0436fe805ac6e684542.tar.xz |
mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
commit c164154f66f0c9b02673f07aa4f044f1d9c70274 upstream.
This removes the 'write' and 'force' use from get_user_pages_unlocked()
and replaces them with 'gup_flags' to make the use of FOLL_FORCE
explicit in callers as use of this flag can result in surprising
behaviour (and hence bugs) within the mm subsystem.
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 4.4:
- Also update calls from process_vm_rw_single_vec() and async_pf_execute()
- Adjust context]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/async_pf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 4f70d12e392d..eddce59986ee 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -80,7 +80,7 @@ static void async_pf_execute(struct work_struct *work) might_sleep(); - get_user_pages_unlocked(NULL, mm, addr, 1, 1, 0, NULL); + get_user_pages_unlocked(NULL, mm, addr, 1, NULL, FOLL_WRITE); kvm_async_page_present_sync(vcpu, apf); spin_lock(&vcpu->async_pf.lock); |