Trond Myklebust ace149e083 filemap: Fix bounds checking in filemap_read()
If the caller supplies an iocb->ki_pos value that is close to the
filesystem upper limit, and an iterator with a count that causes us to
overflow that limit, then filemap_read() enters an infinite loop.

This behaviour was discovered when testing xfstests generic/525 with the
"localio" optimisation for loopback NFS mounts.

Reported-by: Mike Snitzer <snitzer@kernel.org>
Fixes: c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()")
Tested-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-11-10 14:07:08 -08:00
..
2024-10-30 20:14:11 -07:00
2024-09-03 21:15:36 -07:00
2024-09-09 16:38:59 -07:00
2023-12-12 10:11:32 +01:00
2024-09-03 21:15:44 -07:00
2023-04-12 17:36:23 -07:00
2024-09-03 21:15:31 -07:00
2024-09-25 11:35:19 -07:00
2022-10-03 14:02:43 -07:00
2024-11-05 16:49:55 -08:00
2024-09-03 21:15:31 -07:00
2024-08-15 22:16:14 -07:00
2024-07-10 12:14:54 -07:00
2024-09-01 20:26:04 -07:00
2021-05-07 00:26:35 -07:00
2024-09-01 14:43:08 -07:00
2023-04-12 17:36:23 -07:00
2024-11-05 16:49:55 -08:00
2024-11-05 16:49:55 -08:00
2024-09-09 16:39:04 -07:00
2024-04-25 20:55:48 -07:00
2024-04-25 20:55:48 -07:00