aboutsummaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/util.c b/mm/util.c
index 4c685bde5ebc..952cbe7ad7b7 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -624,7 +624,7 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
624 if (len > buflen) 624 if (len > buflen)
625 len = buflen; 625 len = buflen;
626 626
627 res = access_process_vm(task, arg_start, buffer, len, 0); 627 res = access_process_vm(task, arg_start, buffer, len, FOLL_FORCE);
628 628
629 /* 629 /*
630 * If the nul at the end of args has been overwritten, then 630 * 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)
639 if (len > buflen - res) 639 if (len > buflen - res)
640 len = buflen - res; 640 len = buflen - res;
641 res += access_process_vm(task, env_start, 641 res += access_process_vm(task, env_start,
642 buffer+res, len, 0); 642 buffer+res, len,
643 FOLL_FORCE);
643 res = strnlen(buffer, res); 644 res = strnlen(buffer, res);
644 } 645 }
645 } 646 }