+ fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts.patch added to -mm tree
To: davej@xxxxxxxxxx,akinobu.mita@xxxxxxxxx,davej@xxxxxxxxxxxxxxxxx,rientjes@xxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 19 Feb 2014 13:40:47 -0800


The patch titled
     Subject: fault-injection: set bounds on what /proc/self/make-it-fail accepts.
has been added to the -mm tree.  Its filename is
     fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Dave Jones <davej@xxxxxxxxxx>
Subject: fault-injection: set bounds on what /proc/self/make-it-fail accepts.

/proc/self/make-it-fail is a boolean, but accepts any number, including
negative ones.  Change variable to unsigned, and cap upper bound at 1.

Signed-off-by: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Reviewed-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/base.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff -puN fs/proc/base.c~fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts fs/proc/base.c
--- a/fs/proc/base.c~fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts
+++ a/fs/proc/base.c
@@ -1207,7 +1207,7 @@ static ssize_t proc_fault_inject_read(st
 	struct task_struct *task = get_proc_task(file_inode(file));
 	char buffer[PROC_NUMBUF];
 	size_t len;
-	int make_it_fail;
+	unsigned int make_it_fail;
 
 	if (!task)
 		return -ESRCH;
@@ -1224,7 +1224,7 @@ static ssize_t proc_fault_inject_write(s
 {
 	struct task_struct *task;
 	char buffer[PROC_NUMBUF], *end;
-	int make_it_fail;
+	unsigned int make_it_fail;
 
 	if (!capable(CAP_SYS_RESOURCE))
 		return -EPERM;
@@ -1236,6 +1236,9 @@ static ssize_t proc_fault_inject_write(s
 	make_it_fail = simple_strtol(strstrip(buffer), &end, 0);
 	if (*end)
 		return -EINVAL;
+	if (make_it_fail > 1)
+		return -EINVAL;
+
 	task = get_proc_task(file_inode(file));
 	if (!task)
 		return -ESRCH;
_

Patches currently in -mm which might be from davej@xxxxxxxxxx are

origin.patch
dma-debug-account-for-cachelines-and-read-only-mappings-in-overlap-tracking.patch
dma-debug-account-for-cachelines-and-read-only-mappings-in-overlap-tracking-v2.patch
fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts.patch
fault-injection-set-bounds-on-what-proc-self-make-it-fail-accepts-fix.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux