aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/compat_linux.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-08-11 06:26:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-13 19:53:13 -0400
commitc7887325230aec47d47a32562a6e26014a0fafca (patch)
tree10535943dace59ddb01d3440aa582bc4640e8016 /arch/s390/kernel/compat_linux.c
parentb84ae4a1401a731ef5fee987c0cb08743838dda7 (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/s390/kernel/compat_linux.c')
-rw-r--r--arch/s390/kernel/compat_linux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 73b624ed9cd..1e6449c79ab 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -436,7 +436,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
436 * sys32_execve() executes a new program after the asm stub has set 436 * sys32_execve() executes a new program after the asm stub has set
437 * things up for us. This should basically do what I want it to. 437 * things up for us. This should basically do what I want it to.
438 */ 438 */
439asmlinkage long sys32_execve(char __user *name, compat_uptr_t __user *argv, 439asmlinkage long sys32_execve(const char __user *name, compat_uptr_t __user *argv,
440 compat_uptr_t __user *envp) 440 compat_uptr_t __user *envp)
441{ 441{
442 struct pt_regs *regs = task_pt_regs(current); 442 struct pt_regs *regs = task_pt_regs(current);
@@ -570,7 +570,7 @@ static int cp_stat64(struct stat64_emu31 __user *ubuf, struct kstat *stat)
570 return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; 570 return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
571} 571}
572 572
573asmlinkage long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf) 573asmlinkage long sys32_stat64(const char __user * filename, struct stat64_emu31 __user * statbuf)
574{ 574{
575 struct kstat stat; 575 struct kstat stat;
576 int ret = vfs_stat(filename, &stat); 576 int ret = vfs_stat(filename, &stat);
@@ -579,7 +579,7 @@ asmlinkage long sys32_stat64(char __user * filename, struct stat64_emu31 __user
579 return ret; 579 return ret;
580} 580}
581 581
582asmlinkage long sys32_lstat64(char __user * filename, struct stat64_emu31 __user * statbuf) 582asmlinkage long sys32_lstat64(const char __user * filename, struct stat64_emu31 __user * statbuf)
583{ 583{
584 struct kstat stat; 584 struct kstat stat;
585 int ret = vfs_lstat(filename, &stat); 585 int ret = vfs_lstat(filename, &stat);
@@ -597,7 +597,7 @@ asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 __user * sta
597 return ret; 597 return ret;
598} 598}
599 599
600asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename, 600asmlinkage long sys32_fstatat64(unsigned int dfd, const char __user *filename,
601 struct stat64_emu31 __user* statbuf, int flag) 601 struct stat64_emu31 __user* statbuf, int flag)
602{ 602{
603 struct kstat stat; 603 struct kstat stat;
@@ -655,7 +655,7 @@ asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count)
655 return sys_read(fd, buf, count); 655 return sys_read(fd, buf, count);
656} 656}
657 657
658asmlinkage long sys32_write(unsigned int fd, char __user * buf, size_t count) 658asmlinkage long sys32_write(unsigned int fd, const char __user * buf, size_t count)
659{ 659{
660 if ((compat_ssize_t) count < 0) 660 if ((compat_ssize_t) count < 0)
661 return -EINVAL; 661 return -EINVAL;