[PATCH 20/24] jrcu: bugfix: process all tokens

From: Joe Korty
Date: Thu Mar 24 2011 - 13:50:05 EST


jrcu: process all tokens written to debugfs file rcudata,
not just the first one.

Signed-off-by: Joe Korty <joe.korty@xxxxxxxx>

Index: b/kernel/jrcu.c
===================================================================
--- a/kernel/jrcu.c
+++ b/kernel/jrcu.c
@@ -659,6 +659,7 @@ static ssize_t rcu_debugfs_write(struct
if (__get_user(c, &buffer[i++]))
return -EFAULT;

+next:
/* Token extractor -- first, skip leading whitepace */
while (c && isspace(c) && i < count) {
if (__get_user(c, &buffer[i++]))
@@ -693,8 +694,7 @@ static ssize_t rcu_debugfs_write(struct
rcu_wdog_lim = wdog * USEC_PER_SEC;
} else
return -EINVAL;
-
- return count;
+ goto next;
}

static int rcu_debugfs_open(struct inode *inode, struct file *file)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/