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/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/signal.c')
-rw-r--r-- | arch/s390/kernel/signal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 4392a77cbae8..4c8a7954ef48 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -80,10 +80,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
80 | old_sigset_t mask; | 80 | old_sigset_t mask; |
81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | 82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || |
83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) | 83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || |
84 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
85 | __get_user(mask, &act->sa_mask)) | ||
84 | return -EFAULT; | 86 | return -EFAULT; |
85 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
86 | __get_user(mask, &act->sa_mask); | ||
87 | siginitset(&new_ka.sa.sa_mask, mask); | 87 | siginitset(&new_ka.sa.sa_mask, mask); |
88 | } | 88 | } |
89 | 89 | ||
@@ -92,10 +92,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
92 | if (!ret && oact) { | 92 | if (!ret && oact) { |
93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | 94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || |
95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) | 95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || |
96 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
97 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
96 | return -EFAULT; | 98 | return -EFAULT; |
97 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
98 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
99 | } | 99 | } |
100 | 100 | ||
101 | return ret; | 101 | return ret; |