mm: fix anon vma naming
Colin Cross [Wed, 30 Oct 2013 20:14:12 +0000 (13:14 -0700)]
Fix two bugs caused by merging anon vma_naming, a typo in
mempolicy.c and a bad merge in sys.c.

Change-Id: Ia4ced447d50573e68195e95ea2f2b4d9456b8a90
Signed-off-by: Colin Cross <ccross@android.com>

kernel/sys.c
mm/mempolicy.c

index 1c9090b..3dcf1de 100644 (file)
@@ -2368,9 +2368,6 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
                        else
                                return -EINVAL;
                        break;
-               case PR_SET_VMA:
-                       error = prctl_set_vma(arg2, arg3, arg4, arg5);
-                       break;
                default:
                        return -EINVAL;
                }
@@ -2407,6 +2404,9 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
                if (arg2 || arg3 || arg4 || arg5)
                        return -EINVAL;
                return current->no_new_privs ? 1 : 0;
+       case PR_SET_VMA:
+               error = prctl_set_vma(arg2, arg3, arg4, arg5);
+               break;
        default:
                error = -EINVAL;
                break;
index 7b349aa..bf12a3f 100644 (file)
@@ -728,7 +728,7 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
                        ((vmstart - vma->vm_start) >> PAGE_SHIFT);
                prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags,
                                  vma->anon_vma, vma->vm_file, pgoff,
-                                 new_pol, vma_get_anon_name(name));
+                                 new_pol, vma_get_anon_name(vma));
                if (prev) {
                        vma = prev;
                        next = vma->vm_next;