aboutsummaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:13:54 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:15:14 -0500
commit2ed7c03ec17779afb4fcfa3b8c61df61bd4879ba (patch)
tree4e0fefd574bab5470a02edf439727f472a9663c6 /fs/read_write.c
parent4c696ba7982501d43dea11dbbaabd2aa8a19cc42 (diff)
[CVE-2009-0029] Convert all system calls to return a long
Convert all system calls to return a long. This should be a NOP since all converted types should have the same size anyway. With the exception of sys_exit_group which returned void. But that doesn't matter since the system call doesn't return. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 5cc6924eb158..940367f51f2a 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -147,7 +147,7 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int origin)
147} 147}
148EXPORT_SYMBOL(vfs_llseek); 148EXPORT_SYMBOL(vfs_llseek);
149 149
150asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) 150asmlinkage long sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
151{ 151{
152 off_t retval; 152 off_t retval;
153 struct file * file; 153 struct file * file;
@@ -369,7 +369,7 @@ static inline void file_pos_write(struct file *file, loff_t pos)
369 file->f_pos = pos; 369 file->f_pos = pos;
370} 370}
371 371
372asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) 372asmlinkage long sys_read(unsigned int fd, char __user * buf, size_t count)
373{ 373{
374 struct file *file; 374 struct file *file;
375 ssize_t ret = -EBADF; 375 ssize_t ret = -EBADF;
@@ -386,7 +386,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
386 return ret; 386 return ret;
387} 387}
388 388
389asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count) 389asmlinkage long sys_write(unsigned int fd, const char __user * buf, size_t count)
390{ 390{
391 struct file *file; 391 struct file *file;
392 ssize_t ret = -EBADF; 392 ssize_t ret = -EBADF;
@@ -403,7 +403,7 @@ asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t co
403 return ret; 403 return ret;
404} 404}
405 405
406asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, 406asmlinkage long sys_pread64(unsigned int fd, char __user *buf,
407 size_t count, loff_t pos) 407 size_t count, loff_t pos)
408{ 408{
409 struct file *file; 409 struct file *file;
@@ -424,7 +424,7 @@ asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf,
424 return ret; 424 return ret;
425} 425}
426 426
427asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, 427asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf,
428 size_t count, loff_t pos) 428 size_t count, loff_t pos)
429{ 429{
430 struct file *file; 430 struct file *file;
@@ -672,7 +672,7 @@ ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
672 672
673EXPORT_SYMBOL(vfs_writev); 673EXPORT_SYMBOL(vfs_writev);
674 674
675asmlinkage ssize_t 675asmlinkage long
676sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) 676sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
677{ 677{
678 struct file *file; 678 struct file *file;
@@ -693,7 +693,7 @@ sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
693 return ret; 693 return ret;
694} 694}
695 695
696asmlinkage ssize_t 696asmlinkage long
697sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) 697sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen)
698{ 698{
699 struct file *file; 699 struct file *file;
@@ -812,7 +812,7 @@ out:
812 return retval; 812 return retval;
813} 813}
814 814
815asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, size_t count) 815asmlinkage long sys_sendfile(int out_fd, int in_fd, off_t __user *offset, size_t count)
816{ 816{
817 loff_t pos; 817 loff_t pos;
818 off_t off; 818 off_t off;
@@ -831,7 +831,7 @@ asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, siz
831 return do_sendfile(out_fd, in_fd, NULL, count, 0); 831 return do_sendfile(out_fd, in_fd, NULL, count, 0);
832} 832}
833 833
834asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count) 834asmlinkage long sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count)
835{ 835{
836 loff_t pos; 836 loff_t pos;
837 ssize_t ret; 837 ssize_t ret;