Skip to contentSkip to conversation

+ mm-constify-nmask-argument-to-mbind.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Apr 30, 2014

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + mm-constify-nmask-argument-to-mbind.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Wed, 30 Apr 2014 11:16:19 -0700

The patch titled
Subject: mm: constify nmask argument to mbind()
has been added to the -mm tree. Its filename is
mm-constify-nmask-argument-to-mbind.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-constify-nmask-argument-to-mbind.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-constify-nmask-argument-to-mbind.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Rasmus Villemoes <[email protected]>
Subject: 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.

---

 include/linux/syscalls.h |    2 +-
 mm/mempolicy.c           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/syscalls.h renamed from include/linux/syscalls.h~mm-constify-nmask-argument-to-mbind +1 -1
diff -puN include/linux/syscalls.h~mm-constify-nmask-argument-to-mbind include/linux/syscalls.h
@@ -723,7 +723,7 @@ asmlinkage long sys_move_pages(pid_t pid
 				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,
mm/mempolicy.c renamed from mm/mempolicy.c~mm-constify-nmask-argument-to-mbind +1 -1
diff -puN mm/mempolicy.c~mm-constify-nmask-argument-to-mbind mm/mempolicy.c
@@ -1312,7 +1312,7 @@ static int copy_nodes_to_user(unsigned l
 }
 
 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;

_

Patches currently in -mm which might be from [email protected] are

mm-constify-nmask-argument-to-mbind.patch