Fix crash found by syzkaller. The fix allows to remove ->vm_ops checks. v2: - Catch few more cases where we need to initialize ->vm_ops: + nommu; + ia64; - Make sure that we initialize ->vm_ops even if ->mmap failed. We need ->vm_ops in error path too. Kirill A. Shutemov (2): mm: Fix vma_is_anonymous() false-positives mm: Drop unneeded ->vm_ops checks arch/ia64/kernel/perfmon.c | 1 + arch/ia64/mm/init.c | 2 ++ drivers/char/mem.c | 1 + fs/binfmt_elf.c | 2 +- fs/exec.c | 1 + fs/hugetlbfs/inode.c | 1 + fs/kernfs/file.c | 20 +------------------- fs/proc/task_mmu.c | 2 +- include/linux/mm.h | 5 ++++- kernel/events/core.c | 2 +- kernel/fork.c | 2 +- mm/gup.c | 2 +- mm/hugetlb.c | 2 +- mm/khugepaged.c | 4 ++-- mm/memory.c | 12 ++++++------ mm/mempolicy.c | 10 +++++----- mm/mmap.c | 25 ++++++++++++++++++------- mm/mremap.c | 2 +- mm/nommu.c | 13 ++++++++++--- mm/shmem.c | 1 + mm/util.c | 12 ++++++++++++ 21 files changed, 72 insertions(+), 50 deletions(-) -- 2.18.0