aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 21:11:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 21:11:45 -0400
commitf9369910a6225b8d4892c3f20ae740a711cd5ace (patch)
tree8650ff79d7607bceb35509c028400ecf1c317de0 /arch/parisc
parent05f144a0d5c2207a0349348127f996e104ad7404 (diff)
parent415d04d08fec74b226c92c1fb54ad117c9c6bac4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull first series of signal handling cleanups from Al Viro: "This is just the first part of the queue (about a half of it); assorted fixes all over the place in signal handling. This one ends with all sigsuspend() implementations switched to generic one (->saved_sigmask-based). With this, a bunch of assorted old buglets are fixed and most of the missing bits of NOTIFY_RESUME hookup are in place. Two more fixes sit in arm and um trees respectively, and there's a couple of broken ones that need obvious fixes - parisc and avr32 check TIF_NOTIFY_RESUME only on one of two codepaths; fixes for that will happen in the next series" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (55 commits) unicore32: if there's no handler we need to restore sigmask, syscall or no syscall xtensa: add handling of TIF_NOTIFY_RESUME microblaze: drop 'oldset' argument of do_notify_resume() microblaze: handle TIF_NOTIFY_RESUME score: add handling of NOTIFY_RESUME to do_notify_resume() m68k: add TIF_NOTIFY_RESUME and handle it. sparc: kill ancient comment in sparc_sigaction() h8300: missing checks of __get_user()/__put_user() return values frv: missing checks of __get_user()/__put_user() return values cris: missing checks of __get_user()/__put_user() return values powerpc: missing checks of __get_user()/__put_user() return values sh: missing checks of __get_user()/__put_user() return values sparc: missing checks of __get_user()/__put_user() return values avr32: struct old_sigaction is never used m32r: struct old_sigaction is never used xtensa: xtensa_sigaction doesn't exist alpha: tidy signal delivery up score: don't open-code force_sigsegv() cris: don't open-code force_sigsegv() blackfin: don't open-code force_sigsegv() ...
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/signal.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 12c1ed33dc18..4b9cb0d546d1 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -109,6 +109,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
109 sigframe_size = PARISC_RT_SIGFRAME_SIZE32; 109 sigframe_size = PARISC_RT_SIGFRAME_SIZE32;
110#endif 110#endif
111 111
112 current_thread_info()->restart_block.fn = do_no_restart_syscall;
112 113
113 /* Unwind the user stack to get the rt_sigframe structure. */ 114 /* Unwind the user stack to get the rt_sigframe structure. */
114 frame = (struct rt_sigframe __user *) 115 frame = (struct rt_sigframe __user *)
@@ -131,10 +132,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
131 } 132 }
132 133
133 sigdelsetmask(&set, ~_BLOCKABLE); 134 sigdelsetmask(&set, ~_BLOCKABLE);
134 spin_lock_irq(&current->sighand->siglock); 135 set_current_blocked(&set);
135 current->blocked = set;
136 recalc_sigpending();
137 spin_unlock_irq(&current->sighand->siglock);
138 136
139 /* Good thing we saved the old gr[30], eh? */ 137 /* Good thing we saved the old gr[30], eh? */
140#ifdef CONFIG_64BIT 138#ifdef CONFIG_64BIT
@@ -454,12 +452,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
454 if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall)) 452 if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall))
455 return 0; 453 return 0;
456 454
457 spin_lock_irq(&current->sighand->siglock); 455 block_sigmask(ka, sig);
458 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
459 if (!(ka->sa.sa_flags & SA_NODEFER))
460 sigaddset(&current->blocked,sig);
461 recalc_sigpending();
462 spin_unlock_irq(&current->sighand->siglock);
463 456
464 tracehook_signal_handler(sig, info, ka, regs, 457 tracehook_signal_handler(sig, info, ka, regs,
465 test_thread_flag(TIF_SINGLESTEP) || 458 test_thread_flag(TIF_SINGLESTEP) ||
@@ -474,8 +467,6 @@ syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
474 /* Check the return code */ 467 /* Check the return code */
475 switch (regs->gr[28]) { 468 switch (regs->gr[28]) {
476 case -ERESTART_RESTARTBLOCK: 469 case -ERESTART_RESTARTBLOCK:
477 current_thread_info()->restart_block.fn =
478 do_no_restart_syscall;
479 case -ERESTARTNOHAND: 470 case -ERESTARTNOHAND:
480 DBG(1,"ERESTARTNOHAND: returning -EINTR\n"); 471 DBG(1,"ERESTARTNOHAND: returning -EINTR\n");
481 regs->gr[28] = -EINTR; 472 regs->gr[28] = -EINTR;