grow_buffers() infinite loop fix (CVE-2006-5757, CVE-2006-6060)
If grow_buffers() is for some reason passed a block number which wants to lie
outside the maximum-addressable pagecache range (PAGE_SIZE * 4G bytes) then it
will accidentally truncate `index' and will then instnatiate a page at the
wrong pagecache offset. This causes __getblk_slow() to go into an infinite
This can happen with corrupted disks, or with software errors elsewhere.
Detect that, and handle it.
Signed-off-by: Andrew Morton <email@example.com>
Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
Signed-off-by: Chris Wright <email@example.com>
Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>