summaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-08 12:17:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-08 12:17:25 -0700
commit09b56d5a418b7ced4ca427c7cf8faf11df72364c (patch)
tree88ad1fe20f8fd7df89131cef5c7f8ef96f15406d /mm/mmap.c
parentfe1b518075d86976db3a93e7e8b640d24d477519 (diff)
parent98becb781e3e27d74efe5f3653b948d39f694cfb (diff)
downloadlinux-09b56d5a418b7ced4ca427c7cf8faf11df72364c.tar.gz
linux-09b56d5a418b7ced4ca427c7cf8faf11df72364c.tar.bz2
linux-09b56d5a418b7ced4ca427c7cf8faf11df72364c.zip
Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: - add support for ftrace-with-registers, which is needed for kgraft and other ftrace tools - support for mremap() for the sigpage/vDSO so that checkpoint/restore can work - add timestamps to each line of the register dump output - remove the unused KTHREAD_SIZE from nommu - align the ARM bitops APIs with the generic API (using unsigned long pointers rather than void pointers) - make the configuration of userspace Thumb support an expert option so that we can default it on, and avoid some hard to debug userspace crashes * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8684/1: NOMMU: Remove unused KTHREAD_SIZE definition ARM: 8683/1: ARM32: Support mremap() for sigpage/vDSO ARM: 8679/1: bitops: Align prototypes to generic API ARM: 8678/1: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS ARM: make configuration of userspace Thumb support an expert option ARM: 8673/1: Fix __show_regs output timestamps
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 5a0ba9788cdd..7f8cfe9d9b4d 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -3186,8 +3186,12 @@ static int special_mapping_mremap(struct vm_area_struct *new_vma)
{
struct vm_special_mapping *sm = new_vma->vm_private_data;
+ if (WARN_ON_ONCE(current->mm != new_vma->vm_mm))
+ return -EFAULT;
+
if (sm->mremap)
return sm->mremap(sm, new_vma);
+
return 0;
}