Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209616
b: refs/heads/master
c: 1aa54bc
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Steven Rostedt committed Aug 13, 2010
1 parent 878d71e commit 3e102c7
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 2a37a3df57c44e947271758a1aa4bea7bff9feab
refs/heads/master: 1aa54bca6ee0d07ebcafb8ca8074b624d80724aa
11 changes: 8 additions & 3 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3498,6 +3498,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *fpos)
{
char *buf;
size_t written;

if (tracing_disabled)
return -EINVAL;
Expand All @@ -3519,11 +3520,15 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
} else
buf[cnt] = '\0';

cnt = mark_printk("%s", buf);
written = mark_printk("%s", buf);
kfree(buf);
*fpos += cnt;
*fpos += written;

return cnt;
/* don't tell userspace we wrote more - it might confuse them */
if (written > cnt)
written = cnt;

return written;
}

static int tracing_clock_show(struct seq_file *m, void *v)
Expand Down

0 comments on commit 3e102c7

Please sign in to comment.