iov_iter_get_pages{,_alloc}(): cap the maxsize with MAX_RW_COUNT
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 11 Jun 2022 20:44:21 +0000 (16:44 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 6 Jul 2022 20:27:17 +0000 (16:27 -0400)
commit7392ed1734c319150b5ddec3f192a6405728e8d0
treea611a08e4d20f75cb152b750ada69fedb4db2ac1
parent18fa9af7263164ec9a8d7b28a848324825f14672
iov_iter_get_pages{,_alloc}(): cap the maxsize with MAX_RW_COUNT

All callers can and should handle iov_iter_get_pages() returning
fewer pages than requested.  All in-kernel ones do.  And it makes
the arithmetical overflow analysis much simpler...

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c