From: Rasmus Villemoes Date: Wed, 14 May 2014 00:01:57 +0000 (+1000) Subject: mm: constify nmask argument to mbind() X-Git-Tag: next-20140516~2^2~285 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2267403af6a6c216ee034b68d64cedfef4212375;p=karo-tx-linux.git mm: constify nmask argument to mbind() 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 Acked-by: Rik van Riel Signed-off-by: Andrew Morton --- diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a4a0588c5397..bfef0be279dd 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -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, diff --git a/mm/mempolicy.c b/mm/mempolicy.c index ac621fa9dd5d..92e08d90d1b2 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -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;