]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: constify nmask argument to mbind()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 14 May 2014 00:01:57 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:01:57 +0000 (10:01 +1000)
The nmask argument to mbind() is const according to the userspace header
numaif.h, and since the kernel does indeed not modify it, it might as well
be declared const in the kernel.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/syscalls.h
mm/mempolicy.c

index a4a0588c5397f5e0057a3565a45a60ed3d92c4d9..bfef0be279dd30ce81570fd0be39617cbf16849c 100644 (file)
@@ -723,7 +723,7 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
                                int flags);
 asmlinkage long sys_mbind(unsigned long start, unsigned long len,
                                unsigned long mode,
-                               unsigned long __user *nmask,
+                               const unsigned long __user *nmask,
                                unsigned long maxnode,
                                unsigned flags);
 asmlinkage long sys_get_mempolicy(int __user *policy,
index ac621fa9dd5d34de3ba4d07e7d9f3f13131941ba..92e08d90d1b28e4931f3f033717c9bb12e50b48f 100644 (file)
@@ -1312,7 +1312,7 @@ static int copy_nodes_to_user(unsigned long __user *mask, unsigned long maxnode,
 }
 
 SYSCALL_DEFINE6(mbind, unsigned long, start, unsigned long, len,
-               unsigned long, mode, unsigned long __user *, nmask,
+               unsigned long, mode, const unsigned long __user *, nmask,
                unsigned long, maxnode, unsigned, flags)
 {
        nodemask_t nodes;