lkml.org 
[lkml]   [2017]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -mm 1/5] fault-inject: automatically detect the number base for fail-nth write interface
Date
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
\
 
 \ /
  Last update: 2017-04-06 16:58    [W:0.097 / U:1.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site