Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbbGMKyS (ORCPT ); Mon, 13 Jul 2015 06:54:18 -0400 Received: from mga09.intel.com ([134.134.136.24]:23910 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbbGMKyQ (ORCPT ); Mon, 13 Jul 2015 06:54:16 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,462,1432623600"; d="scan'208";a="727863201" From: "Kirill A. Shutemov" To: Andrew Morton , Oleg Nesterov Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH 0/5] Make vma_is_anonymous() reliable Date: Mon, 13 Jul 2015 13:54:07 +0300 Message-Id: <1436784852-144369-1-git-send-email-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2149 Lines: 49 We rely on ->vm_ops == NULL to detect anonymous VMA but this check is not always reliable: - MPX sets ->vm_ops on anonymous VMA; - many drivers don't set ->vm_ops. See for instance hpet_mmap(). This patchset makes vma_is_anonymous() more reliable and makes few cleanups around the code. Kirill A. Shutemov (5): mm: mark most vm_operations_struct const x86, mpx: do not set ->vm_ops on mpx VMAs mm: make sure all file VMAs have ->vm_ops set mm, madvise: use vma_is_anonymous() to check for anon VMA mm, memcontrol: use vma_is_anonymous() to check for anon VMA arch/x86/kernel/vsyscall_64.c | 2 +- arch/x86/mm/mmap.c | 7 +++++++ arch/x86/mm/mpx.c | 20 +------------------- drivers/android/binder.c | 2 +- drivers/gpu/drm/vgem/vgem_drv.c | 2 +- drivers/hsi/clients/cmt_speech.c | 2 +- drivers/infiniband/hw/qib/qib_file_ops.c | 2 +- drivers/infiniband/hw/qib/qib_mmap.c | 2 +- drivers/media/platform/omap/omap_vout.c | 2 +- drivers/misc/genwqe/card_dev.c | 2 +- drivers/staging/android/ion/ion.c | 2 +- drivers/staging/comedi/comedi_fops.c | 2 +- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 2 +- drivers/xen/gntalloc.c | 2 +- drivers/xen/gntdev.c | 2 +- drivers/xen/privcmd.c | 4 ++-- fs/ceph/addr.c | 2 +- fs/cifs/file.c | 2 +- mm/madvise.c | 2 +- mm/memcontrol.c | 2 +- mm/mmap.c | 8 ++++++++ security/selinux/selinuxfs.c | 2 +- 22 files changed, 36 insertions(+), 39 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/