Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar...
[linux-2.6-block.git] / mm / mlock.c
index a90099da4fb41658a21ed290cfe7c8528273f5ea..a72c1eeded7729482e3e93eb47150b7d9d2f763a 100644 (file)
@@ -674,6 +674,8 @@ static __must_check int do_mlock(unsigned long start, size_t len, vm_flags_t fla
        unsigned long lock_limit;
        int error = -ENOMEM;
 
+       start = untagged_addr(start);
+
        if (!can_do_mlock())
                return -EPERM;
 
@@ -735,6 +737,8 @@ SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len)
 {
        int ret;
 
+       start = untagged_addr(start);
+
        len = PAGE_ALIGN(len + (offset_in_page(start)));
        start &= PAGE_MASK;