Thread (3 messages) 3 messages, 2 authors, 2019-11-18

Re: [pipe] d60337eff1: BUG:kernel_NULL_pointer_dereference,address

From: David Howells <dhowells@redhat.com>
Date: 2019-11-15 16:22:39
Also in: keyrings, linux-api, linux-block, linux-fsdevel, linux-usb, lkml, oe-lkp
Subsystem: library code, the rest, userspace copyin/copyout (uiovec) · Maintainers: Andrew Morton, Linus Torvalds, Alexander Viro

Actually, no, this is the fix:
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 7006b5b2106d..be2fc5793ddd 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -537,7 +537,7 @@ static size_t push_pipe(struct iov_iter *i, size_t size,
 		buf->ops = &default_pipe_buf_ops;
 		buf->page = page;
 		buf->offset = 0;
-		buf->len = max_t(ssize_t, left, PAGE_SIZE);
+		buf->len = min_t(ssize_t, left, PAGE_SIZE);
 		left -= buf->len;
 		iter_head++;
 		pipe->head = iter_head;
David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help