diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2017-04-12 09:31:48 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-04-12 09:31:48 +1000 |
commit | 4f0462b4e658f298e0ce9392c9d49e6ab567023e (patch) | |
tree | f9efc05939b32fef102f226c646aa6490f33f004 /fs | |
parent | b8764bd70912205a0e511dd2f77c8c637aff0ab0 (diff) |
fault-inject: automatically detect the number base for fail-nth write interface
Automatically detect the number base to use when writing to fail-nth file
instead of always parsing as a decimal number.
Link: http://lkml.kernel.org/r/1491490561-10485-2-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
-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 ff6d71bcca59..d60d3597fc13 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1371,7 +1371,7 @@ static ssize_t proc_fail_nth_write(struct file *file, const char __user *buf, put_task_struct(task); if (task != current) return -EPERM; - err = kstrtoint_from_user(buf, count, 10, &n); + err = kstrtoint_from_user(buf, count, 0, &n); if (err) return err; if (n < 0 || n == INT_MAX) |