diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-27 17:31:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-27 17:31:44 -0400 |
commit | 5b51a7e9d84f19df4d532ebf5624dbb8ad0d6c9c (patch) | |
tree | aa8359921a8039474c7bb1544823184855e59694 /arch/alpha | |
parent | 3d87ff3e44bd2a13cbe2d2e02cc5e38953ff260f (diff) | |
parent | 4cdfe84b51420c9ac95c7133da2d4c8a191094af (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
[PATCH] deal with the first call of ->show() generating no output
[PATCH] fix ->llseek() for a bunch of directories
[PATCH] fix regular readdir() and friends
[PATCH] fix hpux_getdents()
[PATCH] fix osf_getdirents()
[PATCH] ntfs: use d_add_ci
[PATCH] change d_add_ci argument ordering
[PATCH] fix efs_lookup()
[PATCH] proc: inode number fixlet
Diffstat (limited to 'arch/alpha')
-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 |