Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200315
b: refs/heads/master
c: 6db40cf
h: refs/heads/master
i:
  200313: 957a0d2
  200311: c7d8b17
v: v3
  • Loading branch information
Miklos Szeredi authored and Jens Axboe committed Jun 10, 2010
1 parent c8395c3 commit a9a2731
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: 1d862f41222b7f385bada9f85a67ca5592ffd33e
refs/heads/master: 6db40cf047a8723095caf79f5569d21b388d7b31
7 changes: 4 additions & 3 deletions trunk/fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,12 +1215,13 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
size = round_pipe_size(arg);
nr_pages = size >> PAGE_SHIFT;

ret = -EINVAL;
if (!nr_pages)
goto out;

if (!capable(CAP_SYS_RESOURCE) && size > pipe_max_size) {
ret = -EPERM;
goto out;
} else if (nr_pages < PAGE_SIZE) {
ret = -EINVAL;
goto out;
}
ret = pipe_set_size(pipe, nr_pages);
break;
Expand Down

0 comments on commit a9a2731

Please sign in to comment.