diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-10 03:09:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 03:09:51 -0400 |
commit | 6003ab0bad4cc56f3c4fadf62a0d23a967b9c53b (patch) | |
tree | 2087ca69776116b70a6af0daae9c10bfac1aa347 /arch/alpha/kernel/osf_sys.c | |
parent | ab7476cf76e560f0efda2a631a70aabe93009025 (diff) | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
Merge branch 'linus' into core/debug
Conflicts:
lib/vsprintf.c
Manual merge:
include/linux/kernel.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/alpha/kernel/osf_sys.c')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 6e943135f0e0..8509dad31204 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -121,24 +121,29 @@ osf_filldir(void *__buf, const char *name, int namlen, loff_t offset, | |||
121 | if (reclen > buf->count) | 121 | if (reclen > buf->count) |
122 | return -EINVAL; | 122 | return -EINVAL; |
123 | d_ino = ino; | 123 | d_ino = ino; |
124 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) | 124 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) { |
125 | buf->error = -EOVERFLOW; | ||
125 | return -EOVERFLOW; | 126 | return -EOVERFLOW; |
127 | } | ||
126 | if (buf->basep) { | 128 | if (buf->basep) { |
127 | if (put_user(offset, buf->basep)) | 129 | if (put_user(offset, buf->basep)) |
128 | return -EFAULT; | 130 | goto Efault; |
129 | buf->basep = NULL; | 131 | buf->basep = NULL; |
130 | } | 132 | } |
131 | dirent = buf->dirent; | 133 | dirent = buf->dirent; |
132 | put_user(d_ino, &dirent->d_ino); | 134 | if (put_user(d_ino, &dirent->d_ino) || |
133 | put_user(namlen, &dirent->d_namlen); | 135 | put_user(namlen, &dirent->d_namlen) || |
134 | put_user(reclen, &dirent->d_reclen); | 136 | put_user(reclen, &dirent->d_reclen) || |
135 | if (copy_to_user(dirent->d_name, name, namlen) || | 137 | copy_to_user(dirent->d_name, name, namlen) || |
136 | put_user(0, dirent->d_name + namlen)) | 138 | put_user(0, dirent->d_name + namlen)) |
137 | return -EFAULT; | 139 | goto Efault; |
138 | dirent = (void __user *)dirent + reclen; | 140 | dirent = (void __user *)dirent + reclen; |
139 | buf->dirent = dirent; | 141 | buf->dirent = dirent; |
140 | buf->count -= reclen; | 142 | buf->count -= reclen; |
141 | return 0; | 143 | return 0; |
144 | Efault: | ||
145 | buf->error = -EFAULT; | ||
146 | return -EFAULT; | ||
142 | } | 147 | } |
143 | 148 | ||
144 | asmlinkage int | 149 | asmlinkage int |