diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2017-07-12 23:04:40 +0000 |
---|---|---|
committer | Johannes Weiner <hannes@cmpxchg.org> | 2017-07-12 23:04:40 +0000 |
commit | 70d82437e0d80d53cacd1214390e6a4706321e73 (patch) | |
tree | ecedcd7bcb51d9ea60ff6caca2d036608a1da5eb | |
parent | e1b273566e2960e43d98284d0e13dbd5471b1a68 (diff) |
fault-inject: don't convert unsigned type value as signed int
This fixes fault-inject-simplify-access-check-for-fail-nth.patch in -mm
tree which by mistake partially reverts the change by fault-inject-
parse-as-natural-1-based-value-for-fail-nth-write-interface.patch.
Link: http://lkml.kernel.org/r/1492444483-9239-1-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | fs/proc/base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index edb06890743b..f0d7fb8ec60f 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1363,7 +1363,7 @@ static ssize_t proc_fail_nth_write(struct file *file, const char __user *buf, int err; unsigned int n; - err = kstrtoint_from_user(buf, count, 0, &n); + err = kstrtouint_from_user(buf, count, 0, &n); if (err) return err; |