aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/compat_signal.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-25 19:26:12 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:14 -0500
commit7eddd99c289a443d76391d740c7c62d542174f27 (patch)
treefbfa057ba7fcd71070e0505a27b306c0929ef055 /arch/s390/kernel/compat_signal.c
parentf036b943441ac8e79b779e3500ae4820c243b4f2 (diff)
s390: switch to generic old sigaction()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/s390/kernel/compat_signal.c')
-rw-r--r--arch/s390/kernel/compat_signal.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 141bfe190d52..3e71194c1902 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -157,43 +157,6 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
157 return err; 157 return err;
158} 158}
159 159
160asmlinkage long
161sys32_sigaction(int sig, const struct old_sigaction32 __user *act,
162 struct old_sigaction32 __user *oact)
163{
164 struct k_sigaction new_ka, old_ka;
165 unsigned long sa_handler, sa_restorer;
166 int ret;
167
168 if (act) {
169 compat_old_sigset_t mask;
170 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
171 __get_user(sa_handler, &act->sa_handler) ||
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))
175 return -EFAULT;
176 new_ka.sa.sa_handler = (__sighandler_t) sa_handler;
177 new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer;
178 siginitset(&new_ka.sa.sa_mask, mask);
179 }
180
181 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
182
183 if (!ret && oact) {
184 sa_handler = (unsigned long) old_ka.sa.sa_handler;
185 sa_restorer = (unsigned long) old_ka.sa.sa_restorer;
186 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
187 __put_user(sa_handler, &oact->sa_handler) ||
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))
191 return -EFAULT;
192 }
193
194 return ret;
195}
196
197static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) 160static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs)
198{ 161{
199 _s390_regs_common32 regs32; 162 _s390_regs_common32 regs32;