Messages in this thread Patch in this message | | | From | Akinobu Mita <> | Subject | [PATCH -mm 1/5] fault-inject: automatically detect the number base for fail-nth write interface | Date | Thu, 6 Apr 2017 23:55:57 +0900 |
| |
Automatically detect the number base to use when writing to fail-nth file instead of always parsing as a decimal number.
Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c index f3fc74c..c85376b 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) -- 2.7.4
| |