summaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2015-09-10 00:39:32 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-10 22:29:01 +0200
commit6dc296e7df4c9a0857491cc3f55da16a9eeeeae7 (patch)
tree0e9d5ce09a9a7a5bda0f9bf5b66d7162146fbb21 /arch/alpha
parentmm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff() (diff)
downloadlinux-6dc296e7df4c9a0857491cc3f55da16a9eeeeae7.tar.xz
linux-6dc296e7df4c9a0857491cc3f55da16a9eeeeae7.zip
mm: make sure all file VMAs have ->vm_ops set
We rely on vma->vm_ops == NULL to detect anonymous VMA: see vma_is_anonymous(), but some drivers doesn't set ->vm_ops. As a result we can end up with anonymous page in private file mapping. That should not lead to serious misbehaviour, but nevertheless is wrong. Let's fix by setting up dummy ->vm_ops for file mmapping if f_op->mmap() didn't set its own. The patch also adds sanity check into __vma_link_rb(). It will help catch broken VMAs which inserted directly into mm_struct via insert_vm_struct(). Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Minchan Kim <minchan@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha')
0 files changed, 0 insertions, 0 deletions