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/parisc | |
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/parisc')
-rw-r--r-- | arch/parisc/hpux/fs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 6935123178eb..1444875a7611 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -36,7 +36,7 @@ int hpux_execve(struct pt_regs *regs) | |||
36 | int error; | 36 | int error; |
37 | char *filename; | 37 | char *filename; |
38 | 38 | ||
39 | filename = getname((char __user *) regs->gr[26]); | 39 | filename = getname((const char __user *) regs->gr[26]); |
40 | error = PTR_ERR(filename); | 40 | error = PTR_ERR(filename); |
41 | if (IS_ERR(filename)) | 41 | if (IS_ERR(filename)) |
42 | goto out; | 42 | goto out; |
@@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf) | |||
169 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 169 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
170 | } | 170 | } |
171 | 171 | ||
172 | long hpux_stat64(char __user *filename, struct hpux_stat64 __user *statbuf) | 172 | long hpux_stat64(const char __user *filename, struct hpux_stat64 __user *statbuf) |
173 | { | 173 | { |
174 | struct kstat stat; | 174 | struct kstat stat; |
175 | int error = vfs_stat(filename, &stat); | 175 | int error = vfs_stat(filename, &stat); |
@@ -191,7 +191,8 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf) | |||
191 | return error; | 191 | return error; |
192 | } | 192 | } |
193 | 193 | ||
194 | long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf) | 194 | long hpux_lstat64(const char __user *filename, |
195 | struct hpux_stat64 __user *statbuf) | ||
195 | { | 196 | { |
196 | struct kstat stat; | 197 | struct kstat stat; |
197 | int error = vfs_lstat(filename, &stat); | 198 | int error = vfs_lstat(filename, &stat); |