anonymous vma names: fix build with !MMU
authorColin Cross <ccross@android.com>
Wed, 30 Oct 2013 20:17:34 +0000 (13:17 -0700)
committerColin Cross <ccross@android.com>
Fri, 8 Nov 2013 00:25:12 +0000 (16:25 -0800)
Disable PR_SET_VMA when building with !MMU

Change-Id: I896b6979b99aa61df85caf4c3ec22eb8a8204e64
Signed-off-by: Colin Cross <ccross@android.com>
kernel/sys.c

index 3dcf1de0eb7433a05faaa8ec50f6fba671defedd..126b7c939d1f76fdb4c6fe60a79f71da873ab307 100644 (file)
@@ -2101,7 +2101,7 @@ static int prctl_get_tid_address(struct task_struct *me, int __user **tid_addr)
 }
 #endif
 
-
+#ifdef CONFIG_MMU
 static int prctl_update_vma_anon_name(struct vm_area_struct *vma,
                struct vm_area_struct **prev,
                unsigned long start, unsigned long end,
@@ -2240,6 +2240,13 @@ static int prctl_set_vma(unsigned long opt, unsigned long start,
 
        return error;
 }
+#else /* CONFIG_MMU */
+static int prctl_set_vma(unsigned long opt, unsigned long start,
+               unsigned long len_in, unsigned long arg)
+{
+       return -EINVAL;
+}
+#endif
 
 SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
                unsigned long, arg4, unsigned long, arg5)