From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935492AbdDFO5H (ORCPT ); Thu, 6 Apr 2017 10:57:07 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33011 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935418AbdDFO4X (ORCPT ); Thu, 6 Apr 2017 10:56:23 -0400 From: Akinobu Mita To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Cc: Akinobu Mita , Dmitry Vyukov 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 Message-Id: <1491490561-10485-2-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491490561-10485-1-git-send-email-akinobu.mita@gmail.com> References: <1491490561-10485-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Automatically detect the number base to use when writing to fail-nth file instead of always parsing as a decimal number. Cc: Dmitry Vyukov Signed-off-by: Akinobu Mita --- 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