]> git.baikalelectronics.ru Git - kernel.git/commit
iov_iter: fix page_copy_sane for compound pages
authorPetar Penkov <ppenkov@google.com>
Tue, 29 Aug 2017 18:20:32 +0000 (11:20 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Sep 2017 03:27:48 +0000 (23:27 -0400)
commit4d761c4a03bcb2e7f691d861a1823f3f1de17879
treef172eb5b81e958457422d74e66587bf0071ddebe
parent384fde7ed224f283f11ef2a592b05d4a29492aa8
iov_iter: fix page_copy_sane for compound pages

Issue is that if the data crosses a page boundary inside a compound
page, this check will incorrectly trigger a WARN_ON.

To fix this, compute the order using the head of the compound page and
adjust the offset to be relative to that head.

Fixes: a31c7eb85b8b ("iov_iter: sanity checks for copy to/from page
primitives")

Signed-off-by: Petar Penkov <ppenkov@google.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c