Files
linux/fs
Matthew Wilcox (Oracle) 438191cfde ramfs: fix nommu mmap with gaps in the page cache
[ Upstream commit 50b7d85680 ]

ramfs needs to check that pages are both physically contiguous and
contiguous in the file.  If the page cache happens to have, eg, page A for
index 0 of the file, no page for index 1, and page A+1 for index 2, then
an mmap of the first two pages of the file will succeed when it should
fail.

Fixes: 642fb4d1f1 ("[PATCH] NOMMU: Provide shared-writable mmap support on ramfs")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Howells <dhowells@redhat.com>
Link: https://lkml.kernel.org/r/20200914122239.GO6583@casper.infradead.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-30 10:38:21 +01:00
..
2020-08-19 08:15:06 +02:00
2019-08-06 19:06:51 +02:00
2020-08-19 08:15:02 +02:00
2018-08-17 16:20:28 -07:00
2020-08-26 10:31:01 +02:00
2019-12-13 08:51:59 +01:00
2018-08-17 16:20:27 -07:00
2020-10-17 10:12:58 +02:00
2020-06-22 09:05:01 +02:00
2018-07-03 16:44:45 -04:00
2020-09-03 11:24:24 +02:00
2018-06-05 19:23:26 +02:00
2020-03-05 16:42:12 +01:00
2020-10-01 13:14:27 +02:00
2020-03-25 08:06:14 +01:00
2018-06-11 08:22:34 -07:00