projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b5e09a
)
Fix off-by-one in __pipe_get_pages()
author
Al Viro
<
[email protected]
>
Tue, 11 Oct 2016 17:21:14 +0000
(18:21 +0100)
committer
Linus Torvalds
<
[email protected]
>
Tue, 11 Oct 2016 17:40:01 +0000
(10:40 -0700)
it actually worked only when requested area ended on the page boundary...
Reported-by: Marco Grassi <
[email protected]
>
Signed-off-by: Al Viro <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
lib/iov_iter.c
patch
|
blob
|
history
diff --git
a/lib/iov_iter.c
b/lib/iov_iter.c
index 0ce341125195d665ca473cd70b30a6b82b8bd34b..7312e7784611d7c56b6c154a2c2bb9975142792b 100644
(file)
--- a/
lib/iov_iter.c
+++ b/
lib/iov_iter.c
@@
-833,13
+833,13
@@
static inline size_t __pipe_get_pages(struct iov_iter *i,
size_t *start)
{
struct pipe_inode_info *pipe = i->pipe;
- size_t n = push_pipe(i, maxsize, &idx, start);
+ s
s
ize_t n = push_pipe(i, maxsize, &idx, start);
if (!n)
return -EFAULT;
maxsize = n;
n += *start;
- while (n >
= PAGE_SIZE
) {
+ while (n >
0
) {
get_page(*pages++ = pipe->bufs[idx].page);
idx = next_idx(idx, pipe);
n -= PAGE_SIZE;