aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/hpux/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/hpux/fs.c')
-rw-r--r--arch/parisc/hpux/fs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index 4204cd1f3cf9..c7a81a2c014c 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -35,13 +35,13 @@ int hpux_execve(struct pt_regs *regs)
35 int error; 35 int error;
36 char *filename; 36 char *filename;
37 37
38 filename = getname((char *) regs->gr[26]); 38 filename = getname((char __user *) regs->gr[26]);
39 error = PTR_ERR(filename); 39 error = PTR_ERR(filename);
40 if (IS_ERR(filename)) 40 if (IS_ERR(filename))
41 goto out; 41 goto out;
42 42
43 error = do_execve(filename, (char **) regs->gr[25], 43 error = do_execve(filename, (char __user * __user *) regs->gr[25],
44 (char **)regs->gr[24], regs); 44 (char __user * __user *) regs->gr[24], regs);
45 45
46 if (error == 0) { 46 if (error == 0) {
47 task_lock(current); 47 task_lock(current);
@@ -63,19 +63,19 @@ struct hpux_dirent {
63}; 63};
64 64
65struct getdents_callback { 65struct getdents_callback {
66 struct hpux_dirent *current_dir; 66 struct hpux_dirent __user *current_dir;
67 struct hpux_dirent *previous; 67 struct hpux_dirent __user *previous;
68 int count; 68 int count;
69 int error; 69 int error;
70}; 70};
71 71
72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) 72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
73#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) 73#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
74 74
75static int filldir(void * __buf, const char * name, int namlen, loff_t offset, 75static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
76 u64 ino, unsigned d_type) 76 u64 ino, unsigned d_type)
77{ 77{
78 struct hpux_dirent * dirent; 78 struct hpux_dirent __user * dirent;
79 struct getdents_callback * buf = (struct getdents_callback *) __buf; 79 struct getdents_callback * buf = (struct getdents_callback *) __buf;
80 ino_t d_ino; 80 ino_t d_ino;
81 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); 81 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
@@ -105,10 +105,10 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
105#undef NAME_OFFSET 105#undef NAME_OFFSET
106#undef ROUND_UP 106#undef ROUND_UP
107 107
108int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count) 108int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
109{ 109{
110 struct file * file; 110 struct file * file;
111 struct hpux_dirent * lastdirent; 111 struct hpux_dirent __user * lastdirent;
112 struct getdents_callback buf; 112 struct getdents_callback buf;
113 int error = -EBADF; 113 int error = -EBADF;
114 114
@@ -143,7 +143,7 @@ int hpux_mount(const char *fs, const char *path, int mflag,
143 return -ENOSYS; 143 return -ENOSYS;
144} 144}
145 145
146static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) 146static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf)
147{ 147{
148 struct hpux_stat64 tmp; 148 struct hpux_stat64 tmp;
149 149
@@ -169,7 +169,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *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
172long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) 172long hpux_stat64(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);
@@ -180,7 +180,7 @@ long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
180 return error; 180 return error;
181} 181}
182 182
183long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) 183long hpux_fstat64(unsigned int fd, struct hpux_stat64 __user *statbuf)
184{ 184{
185 struct kstat stat; 185 struct kstat stat;
186 int error = vfs_fstat(fd, &stat); 186 int error = vfs_fstat(fd, &stat);
@@ -191,7 +191,7 @@ long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf)
191 return error; 191 return error;
192} 192}
193 193
194long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf) 194long hpux_lstat64(char __user *filename, struct hpux_stat64 __user *statbuf)
195{ 195{
196 struct kstat stat; 196 struct kstat stat;
197 int error = vfs_lstat(filename, &stat); 197 int error = vfs_lstat(filename, &stat);