From: Akinobu Mita <akinobu.mita@gmail.com>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>
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 [thread overview]
Message-ID: <1491490561-10485-2-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1491490561-10485-1-git-send-email-akinobu.mita@gmail.com>
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
next prev parent reply other threads:[~2017-04-06 14:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 14:55 [PATCH -mm 0/5] fault-inject: improve fail-nth interface Akinobu Mita
2017-04-06 14:55 ` Akinobu Mita [this message]
2017-04-06 14:55 ` [PATCH -mm 2/5] fault-inject: parse as natural 1-based value for fail-nth write interface Akinobu Mita
2017-04-06 14:55 ` [PATCH -mm 3/5] fault-inject: make fail-nth read/write interface symmetric Akinobu Mita
2017-04-07 20:37 ` Dmitry Vyukov
2017-07-12 20:49 ` Andrew Morton
2017-07-13 16:17 ` Akinobu Mita
2017-04-06 14:56 ` [PATCH -mm 4/5] fault-inject: simplify access check for fail-nth Akinobu Mita
2017-04-07 20:23 ` Dmitry Vyukov
2017-04-07 20:45 ` Dmitry Vyukov
2017-04-08 8:25 ` Akinobu Mita
2017-04-08 17:35 ` Dmitry Vyukov
2017-04-06 14:56 ` [PATCH -mm 5/5] fault-inject: add /proc/<pid>/fail-nth Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491490561-10485-2-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).