diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-30 13:38:44 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-30 13:38:44 +0300 |
| commit | bdc065666a591fddc4e55cbdcd6c7b02f289b5ff (patch) | |
| tree | acb92182d7c28a8d5176feb99fd7fb110a693ab7 /fs/exec.c | |
| parent | 32774ef3e4bb339cec19655946996a8c50063be4 (diff) | |
| parent | a909d3e636995ba7c349e2ca5dbb528154d4ac30 (diff) | |
| download | linux-bdc065666a591fddc4e55cbdcd6c7b02f289b5ff.tar.xz | |
Merge 4.9-rc3 into staging-next
This resolves a merge issue with
drivers/staging/iio/accel/sca3000_core.c and we want the fixes all in
here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c index 6fcfb3f7b137..4e497b9ee71e 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -191,6 +191,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, { struct page *page; int ret; + unsigned int gup_flags = FOLL_FORCE; #ifdef CONFIG_STACK_GROWSUP if (write) { @@ -199,12 +200,16 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, return NULL; } #endif + + if (write) + gup_flags |= FOLL_WRITE; + /* * We are doing an exec(). 'current' is the process * doing the exec and bprm->mm is the new process's mm. */ - ret = get_user_pages_remote(current, bprm->mm, pos, 1, write, - 1, &page, NULL); + ret = get_user_pages_remote(current, bprm->mm, pos, 1, gup_flags, + &page, NULL); if (ret <= 0) return NULL; |
