Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143111
b: refs/heads/master
c: 93cfb3c
h: refs/heads/master
i:
  143109: 0076d71
  143107: ec8c246
  143103: 4075168
v: v3
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Apr 10, 2009
1 parent 5a4ec3c commit 66a73d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: c7625a555f55d7ae49236cde551786c88f5a5ce1
refs/heads/master: 93cfb3c9fd83d877a8f1ffad9ff862b617b32828
16 changes: 14 additions & 2 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3428,7 +3428,19 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
int size, i;
size_t ret;

for (i = 0; i < PIPE_BUFFERS && len; i++, len -= size) {
if (*ppos & (PAGE_SIZE - 1)) {
WARN_ONCE(1, "Ftrace: previous read must page-align\n");
return -EINVAL;
}

if (len & (PAGE_SIZE - 1)) {
WARN_ONCE(1, "Ftrace: splice_read should page-align\n");
if (len < PAGE_SIZE)
return -EINVAL;
len &= PAGE_MASK;
}

for (i = 0; i < PIPE_BUFFERS && len; i++, len -= PAGE_SIZE) {
struct page *page;
int r;

Expand Down Expand Up @@ -3467,7 +3479,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
spd.partial[i].offset = 0;
spd.partial[i].private = (unsigned long)ref;
spd.nr_pages++;
*ppos += size;
*ppos += PAGE_SIZE;
}

spd.nr_pages = i;
Expand Down

0 comments on commit 66a73d4

Please sign in to comment.