Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118017
b: refs/heads/master
c: 60063a6
h: refs/heads/master
i:
  118015: c3f2c6a
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 28, 2008
1 parent ccfcb5c commit fad4e28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 21798a84ab383cdac0e7ee3368e0792b718b867d
refs/heads/master: 60063a66236c15f5613f91390631e06718689782
7 changes: 4 additions & 3 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,9 +2377,10 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf,
int i;
size_t ret;

ret = cnt;

if (cnt > max_tracer_type_len)
cnt = max_tracer_type_len;
ret = cnt;

if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
Expand Down Expand Up @@ -2412,8 +2413,8 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf,
out:
mutex_unlock(&trace_types_lock);

if (ret == cnt)
filp->f_pos += cnt;
if (ret > 0)
filp->f_pos += ret;

return ret;
}
Expand Down

0 comments on commit fad4e28

Please sign in to comment.