Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1793768imm; Thu, 12 Jul 2018 07:58:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdVhM5VKl/ReABi3hnvTeFPeOb8L9V7RQPEHAIWGzrNBp0mNqhnmNakdi1oATbqbp5kwCil X-Received: by 2002:a63:8f53:: with SMTP id r19-v6mr2393663pgn.17.1531407501783; Thu, 12 Jul 2018 07:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531407501; cv=none; d=google.com; s=arc-20160816; b=geWmeAn2lHiluMJCThWN0HWlpi+KSf2OSm8C0rqv6q2fX2ar4/EWqN6NRZ5yyCURvs VtDLXvKlWG86a0xH7mGIkmUNOJ4e8Kjt/gfgpnLsi2DPQqhPC7ENTnyyfk6pr4L7Lzds ozLfgo8nCyH0NO06i4lBbSBY/9lmIalZ8vIVxuqSHEmZqUmtrgwotH6JCneylQFHXD6E lRtybcmvMv7As/W8rxlGvn5tGJVE9PXwR8pV+Rk6IAc9om8Awk9PXTOKrC1J998UYoK5 zg1uBqhNYS3S461LOSglJP4s9cnp3iPVPzxU2uidP53Px0o41weFO5no4Qi6Jx6IMfpg 1mOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=OsMjblAgO21Hr5gSGVdO7EEtX/G7Fp5vZAmpkPkuoTQ=; b=gkGOL167D5sRvCl0NILz7Pf3SlGMgMg0GPMsjegmHJVJ0dvn/pgUtgHplD7shgVqrw 5q6OfKdXtLImkG/NuS2OSmKGXTdSFym7f2o36PA5WTmaCvRuDrTq/WdGBf7HcMRU+7O2 TjOnsFF2B6sjd42vB9HGhZrB0TGjgTkSdkHl+dMUHeTu4anOEoUcjV5K3miU+dww8UXY rz3/vIHzyBQ9y1IDoEE1l41XP/YRoUKOfQIjb7WuN+R5M/tcePP3tvtPSz8N/XRjL6YH MPPTo8Yirpp3GeyGR2Sqa8MZ0KoWXmtWyl3rdO1V5+39QbqI9xrEewod2vhqRoHjS8gJ 0azw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92-v6si21297124pli.518.2018.07.12.07.58.06; Thu, 12 Jul 2018 07:58:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732579AbeGLPGg (ORCPT + 99 others); Thu, 12 Jul 2018 11:06:36 -0400 Received: from mga11.intel.com ([192.55.52.93]:52770 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732507AbeGLPGf (ORCPT ); Thu, 12 Jul 2018 11:06:35 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2018 07:56:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,343,1526367600"; d="scan'208";a="57147299" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 12 Jul 2018 07:56:22 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id A3A8D18D; Thu, 12 Jul 2018 17:56:27 +0300 (EEST) From: "Kirill A. Shutemov" To: Andrew Morton Cc: Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCHv2 0/2] Fix crash due to vma_is_anonymous() false-positives Date: Thu, 12 Jul 2018 17:56:24 +0300 Message-Id: <20180712145626.41665-1-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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