diff options
author | David Howells <dhowells@redhat.com> | 2010-08-11 06:26:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-13 19:53:13 -0400 |
commit | c7887325230aec47d47a32562a6e26014a0fafca (patch) | |
tree | 10535943dace59ddb01d3440aa582bc4640e8016 /arch/um | |
parent | b84ae4a1401a731ef5fee987c0cb08743838dda7 (diff) |
Mark arguments to certain syscalls as being const
Mark arguments to certain system calls as being const where they should be but
aren't. The list includes:
(*) The filename arguments of various stat syscalls, execve(), various utimes
syscalls and some mount syscalls.
(*) The filename arguments of some syscall helpers relating to the above.
(*) The buffer argument of various write syscalls.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/exec.c | 6 | ||||
-rw-r--r-- | arch/um/kernel/internal.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/syscall.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index 97974c1bdd1..59b20d93b6d 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -44,7 +44,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) | |||
44 | PT_REGS_SP(regs) = esp; | 44 | PT_REGS_SP(regs) = esp; |
45 | } | 45 | } |
46 | 46 | ||
47 | static long execve1(char *file, char __user * __user *argv, | 47 | static long execve1(const char *file, char __user * __user *argv, |
48 | char __user *__user *env) | 48 | char __user *__user *env) |
49 | { | 49 | { |
50 | long error; | 50 | long error; |
@@ -61,7 +61,7 @@ static long execve1(char *file, char __user * __user *argv, | |||
61 | return error; | 61 | return error; |
62 | } | 62 | } |
63 | 63 | ||
64 | long um_execve(char *file, char __user *__user *argv, char __user *__user *env) | 64 | long um_execve(const char *file, char __user *__user *argv, char __user *__user *env) |
65 | { | 65 | { |
66 | long err; | 66 | long err; |
67 | 67 | ||
@@ -71,7 +71,7 @@ long um_execve(char *file, char __user *__user *argv, char __user *__user *env) | |||
71 | return err; | 71 | return err; |
72 | } | 72 | } |
73 | 73 | ||
74 | long sys_execve(char __user *file, char __user *__user *argv, | 74 | long sys_execve(const char __user *file, char __user *__user *argv, |
75 | char __user *__user *env) | 75 | char __user *__user *env) |
76 | { | 76 | { |
77 | long error; | 77 | long error; |
diff --git a/arch/um/kernel/internal.h b/arch/um/kernel/internal.h index 3bda43c7a78..1303a105fe9 100644 --- a/arch/um/kernel/internal.h +++ b/arch/um/kernel/internal.h | |||
@@ -1 +1 @@ | |||
extern long um_execve(char *file, char __user *__user *argv, char __user *__user *env); | extern long um_execve(const char *file, char __user *__user *argv, char __user *__user *env); | ||
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index 4393173923f..7427c0b1930 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c | |||
@@ -58,7 +58,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |||
58 | 58 | ||
59 | fs = get_fs(); | 59 | fs = get_fs(); |
60 | set_fs(KERNEL_DS); | 60 | set_fs(KERNEL_DS); |
61 | ret = um_execve((char *)filename, (char __user *__user *)argv, | 61 | ret = um_execve(filename, (char __user *__user *)argv, |
62 | (char __user *__user *) envp); | 62 | (char __user *__user *) envp); |
63 | set_fs(fs); | 63 | set_fs(fs); |
64 | 64 | ||