diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-07-16 02:41:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:48 -0400 |
commit | 213dd266d48af90c1eec8688c1ff31aa34d21de2 (patch) | |
tree | 2882f6e84d36421ebe2a6360cfe0c773bd9053bd /kernel | |
parent | e3a68e30d28dbc6981dfc3d6ceddbfa2f885fe4e (diff) |
namespace: ensure clone_flags are always stored in an unsigned long
While working on unshare support for the network namespace I noticed we
were putting clone flags in an int. Which is weird because the syscall
uses unsigned long and we at least need an unsigned to properly hold all of
the unshare flags.
So to make the code consistent, this patch updates the code to use
unsigned long instead of int for the clone flags in those places
where we get it wrong today.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/nsproxy.c | 6 | ||||
-rw-r--r-- | kernel/pid.c | 2 | ||||
-rw-r--r-- | kernel/utsname.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 4b7fcc8f9a48..10f0bbba382b 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c | |||
@@ -58,8 +58,8 @@ static inline struct nsproxy *clone_nsproxy(struct nsproxy *orig) | |||
58 | * Return the newly created nsproxy. Do not attach this to the task, | 58 | * Return the newly created nsproxy. Do not attach this to the task, |
59 | * leave it to the caller to do proper locking and attach it to task. | 59 | * leave it to the caller to do proper locking and attach it to task. |
60 | */ | 60 | */ |
61 | static struct nsproxy *create_new_namespaces(int flags, struct task_struct *tsk, | 61 | static struct nsproxy *create_new_namespaces(unsigned long flags, |
62 | struct fs_struct *new_fs) | 62 | struct task_struct *tsk, struct fs_struct *new_fs) |
63 | { | 63 | { |
64 | struct nsproxy *new_nsp; | 64 | struct nsproxy *new_nsp; |
65 | int err; | 65 | int err; |
@@ -121,7 +121,7 @@ out_ns: | |||
121 | * called from clone. This now handles copy for nsproxy and all | 121 | * called from clone. This now handles copy for nsproxy and all |
122 | * namespaces therein. | 122 | * namespaces therein. |
123 | */ | 123 | */ |
124 | int copy_namespaces(int flags, struct task_struct *tsk) | 124 | int copy_namespaces(unsigned long flags, struct task_struct *tsk) |
125 | { | 125 | { |
126 | struct nsproxy *old_ns = tsk->nsproxy; | 126 | struct nsproxy *old_ns = tsk->nsproxy; |
127 | struct nsproxy *new_ns; | 127 | struct nsproxy *new_ns; |
diff --git a/kernel/pid.c b/kernel/pid.c index eb66bd2953ab..c6e3f9ffff87 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
@@ -365,7 +365,7 @@ struct pid *find_ge_pid(int nr) | |||
365 | } | 365 | } |
366 | EXPORT_SYMBOL_GPL(find_get_pid); | 366 | EXPORT_SYMBOL_GPL(find_get_pid); |
367 | 367 | ||
368 | struct pid_namespace *copy_pid_ns(int flags, struct pid_namespace *old_ns) | 368 | struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *old_ns) |
369 | { | 369 | { |
370 | BUG_ON(!old_ns); | 370 | BUG_ON(!old_ns); |
371 | get_pid_ns(old_ns); | 371 | get_pid_ns(old_ns); |
diff --git a/kernel/utsname.c b/kernel/utsname.c index 3ae43936bd88..9d8180a0f0d8 100644 --- a/kernel/utsname.c +++ b/kernel/utsname.c | |||
@@ -39,7 +39,7 @@ static struct uts_namespace *clone_uts_ns(struct uts_namespace *old_ns) | |||
39 | * utsname of this process won't be seen by parent, and vice | 39 | * utsname of this process won't be seen by parent, and vice |
40 | * versa. | 40 | * versa. |
41 | */ | 41 | */ |
42 | struct uts_namespace *copy_utsname(int flags, struct uts_namespace *old_ns) | 42 | struct uts_namespace *copy_utsname(unsigned long flags, struct uts_namespace *old_ns) |
43 | { | 43 | { |
44 | struct uts_namespace *new_ns; | 44 | struct uts_namespace *new_ns; |
45 | 45 | ||