Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157078
b: refs/heads/master
c: eda1e32
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Olsa authored and Steven Rostedt committed Aug 19, 2009
1 parent 7d49eef commit 37ee4e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2d84b65b9778e8a35dd904f7d3993f0a60c9756
refs/heads/master: eda1e328556565e211b7450250e40d6de751563a
17 changes: 11 additions & 6 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,11 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
read++;
cnt--;

if (!(iter->flags & ~FTRACE_ITER_CONT)) {
/*
* If the parser haven't finished with the last write,
* continue reading the user input without skipping spaces.
*/
if (!(iter->flags & FTRACE_ITER_CONT)) {
/* skip white space */
while (cnt && isspace(ch)) {
ret = get_user(ch, ubuf++);
Expand All @@ -2288,8 +2292,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
cnt--;
}

/* only spaces were written */
if (isspace(ch)) {
file->f_pos += read;
*ppos += read;
ret = read;
goto out;
}
Expand Down Expand Up @@ -2319,12 +2324,12 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
if (ret)
goto out;
iter->buffer_idx = 0;
} else
} else {
iter->flags |= FTRACE_ITER_CONT;
iter->buffer[iter->buffer_idx++] = ch;
}


file->f_pos += read;

*ppos += read;
ret = read;
out:
mutex_unlock(&ftrace_regex_lock);
Expand Down

0 comments on commit 37ee4e8

Please sign in to comment.