summaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorDmitry Safonov <dsafonov@virtuozzo.com>2016-09-05 09:33:05 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-14 15:28:09 -0400
commit2eefd8789698e89c4a5d610921dc3c1b66e3bd0d (patch)
treef9f1fe811f7f2c5395b4c5ba2bb9d6b54ea026cd /mm/mmap.c
parent576ebfefd37bd41e965787f60684c8e4b7f79457 (diff)
x86/arch_prctl/vdso: Add ARCH_MAP_VDSO_*
Add API to change vdso blob type with arch_prctl. As this is usefull only by needs of CRIU, expose this interface under CONFIG_CHECKPOINT_RESTORE. Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by: Andy Lutomirski <luto@kernel.org> Cc: 0x7f454c46@gmail.com Cc: oleg@redhat.com Cc: linux-mm@kvack.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-4-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index ca9d91bca0d6..6373ebd358c0 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3063,6 +3063,14 @@ out:
3063 return ERR_PTR(ret); 3063 return ERR_PTR(ret);
3064} 3064}
3065 3065
3066bool vma_is_special_mapping(const struct vm_area_struct *vma,
3067 const struct vm_special_mapping *sm)
3068{
3069 return vma->vm_private_data == sm &&
3070 (vma->vm_ops == &special_mapping_vmops ||
3071 vma->vm_ops == &legacy_special_mapping_vmops);
3072}
3073
3066/* 3074/*
3067 * Called with mm->mmap_sem held for writing. 3075 * Called with mm->mmap_sem held for writing.
3068 * Insert a new vma covering the given region, with the given flags. 3076 * Insert a new vma covering the given region, with the given flags.