aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2017-05-26 11:32:23 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-05-26 11:32:23 +1000
commit22365aaedd6e129209ec2bbe7d7ec5b7461eec28 (patch)
tree148107b5157fe4120cc1013455fc587ff034032e
parent76f97579559e0b710e78eeb52e88b4b8785b87ed (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>
-rw-r--r--fs/proc/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 7e4b7c012c95..f7247ea2c780 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1368,7 +1368,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)