diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-10-27 06:39:22 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-10-27 06:39:22 -0400 |
commit | 12bae23507129a7337378e6433bff6f8696bdb45 (patch) | |
tree | ad28d5bcebf3aebe8926446a5d12418f62276b8a /arch/s390/kernel/compat_signal.c | |
parent | c2b1449bd1fd73103ed5ff1a28d8f7cbc8a01b52 (diff) |
[S390] uaccess error handling.
Consider return values for all user space access function and
return -EFAULT on error.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/compat_signal.c')
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index d49b876a83bf..861888ab8c13 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -169,12 +169,12 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
169 | compat_old_sigset_t mask; | 169 | compat_old_sigset_t mask; |
170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
171 | __get_user(sa_handler, &act->sa_handler) || | 171 | __get_user(sa_handler, &act->sa_handler) || |
172 | __get_user(sa_restorer, &act->sa_restorer)) | 172 | __get_user(sa_restorer, &act->sa_restorer) || |
173 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
174 | __get_user(mask, &act->sa_mask)) | ||
173 | return -EFAULT; | 175 | return -EFAULT; |
174 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; | 176 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; |
175 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; | 177 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; |
176 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
177 | __get_user(mask, &act->sa_mask); | ||
178 | siginitset(&new_ka.sa.sa_mask, mask); | 178 | siginitset(&new_ka.sa.sa_mask, mask); |
179 | } | 179 | } |
180 | 180 | ||
@@ -185,10 +185,10 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; | 185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; |
186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
187 | __put_user(sa_handler, &oact->sa_handler) || | 187 | __put_user(sa_handler, &oact->sa_handler) || |
188 | __put_user(sa_restorer, &oact->sa_restorer)) | 188 | __put_user(sa_restorer, &oact->sa_restorer) || |
189 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
190 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
189 | return -EFAULT; | 191 | return -EFAULT; |
190 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
191 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
192 | } | 192 | } |
193 | 193 | ||
194 | return ret; | 194 | return ret; |