Revision 6b7339f4c31ad69c8e9c0b2859276e22cf72176d authored by Kirill A. Shutemov on 06 July 2015, 20:18:37 UTC, committed by Linus Torvalds on 09 July 2015, 18:12:48 UTC
Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated pte with do_anonymous_page(). Let's change page fault handler to use do_anonymous_page() only on anonymous VMA (->vm_ops == NULL) and make sure that the VMA is not shared. For file mappings without vm_ops->fault() or shred VMA without vm_ops, page fault on pte_none() entry would lead to SIGBUS. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Willy Tarreau <w@1wt.eu> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 883a2df
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 3.1 KB |
Makefile | -rw-r--r-- | 416 bytes |
acl.c | -rw-r--r-- | 8.8 KB |
acl.h | -rw-r--r-- | 1.2 KB |
checkpoint.c | -rw-r--r-- | 27.3 KB |
crypto.c | -rw-r--r-- | 12.7 KB |
crypto_fname.c | -rw-r--r-- | 11.0 KB |
crypto_key.c | -rw-r--r-- | 6.7 KB |
crypto_policy.c | -rw-r--r-- | 5.9 KB |
data.c | -rw-r--r-- | 50.0 KB |
debug.c | -rw-r--r-- | 13.1 KB |
dir.c | -rw-r--r-- | 20.8 KB |
f2fs.h | -rw-r--r-- | 63.0 KB |
f2fs_crypto.h | -rw-r--r-- | 3.8 KB |
file.c | -rw-r--r-- | 37.3 KB |
gc.c | -rw-r--r-- | 20.2 KB |
gc.h | -rw-r--r-- | 3.0 KB |
hash.c | -rw-r--r-- | 2.0 KB |
inline.c | -rw-r--r-- | 12.7 KB |
inode.c | -rw-r--r-- | 10.4 KB |
namei.c | -rw-r--r-- | 24.0 KB |
node.c | -rw-r--r-- | 50.1 KB |
node.h | -rw-r--r-- | 10.5 KB |
recovery.c | -rw-r--r-- | 13.7 KB |
segment.c | -rw-r--r-- | 61.2 KB |
segment.h | -rw-r--r-- | 22.3 KB |
super.c | -rw-r--r-- | 35.3 KB |
trace.c | -rw-r--r-- | 3.4 KB |
trace.h | -rw-r--r-- | 1013 bytes |
xattr.c | -rw-r--r-- | 14.8 KB |
xattr.h | -rw-r--r-- | 4.6 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...