summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* unicore32: if there's no handler we need to restore sigmask, syscall or no ↵Al Viro2012-05-221-8/+5
| | | | | | syscall Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: add handling of TIF_NOTIFY_RESUMEAl Viro2012-05-223-6/+20
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: drop 'oldset' argument of do_notify_resume()Al Viro2012-05-223-19/+11
| | | | | | never used... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: handle TIF_NOTIFY_RESUMEAl Viro2012-05-223-26/+38
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* score: add handling of NOTIFY_RESUME to do_notify_resume()Al Viro2012-05-221-1/+8
| | | | | | | | | It's already called if TIF_NOTIFY_RESUME is set, so we only need to add the actual work. Note that checking for RESTORE_SIGMASK was not needed - set_restore_sigmask() also sets SIGPENDING, so we never RESTORE_SIGMASK without SIGPENDING. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m68k: add TIF_NOTIFY_RESUME and handle it.Al Viro2012-05-226-7/+21
| | | | | | | | | | | | | | TIF_NOTIFY_RESUME added (as bit 5). That way nommu glue needs no changes at all; mmu one needs just to replace jmi do_signal_return to jne do_signal_return There we have flags shifted up, until bit 6 (SIGPENDING) is in MSBit; instead of checking that MSBit is set (jmi) we check that MSBit or something below it is set (jne); bits 0..4 are never set, so that's precisely "bit 6 or bit 5 is set". Usual handling of NOTIFY_RESUME/SIGPENDING is done in do_notify_resume(); glue calls it instead of do_signal(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* sparc: kill ancient comment in sparc_sigaction()Al Viro2012-05-221-5/+0
| | | | | | | It used to be true, until 2.1.78 (14 years ago) when we switched to do_sigaction()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* h8300: missing checks of __get_user()/__put_user() return valuesAl Viro2012-05-221-6/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* frv: missing checks of __get_user()/__put_user() return valuesAl Viro2012-05-221-6/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cris: missing checks of __get_user()/__put_user() return valuesAl Viro2012-05-222-12/+12
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* powerpc: missing checks of __get_user()/__put_user() return valuesAl Viro2012-05-221-3/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* sh: missing checks of __get_user()/__put_user() return valuesAl Viro2012-05-222-22/+27
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* sparc: missing checks of __get_user()/__put_user() return valuesAl Viro2012-05-222-10/+12
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* avr32: struct old_sigaction is never usedAl Viro2012-05-221-7/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m32r: struct old_sigaction is never usedAl Viro2012-05-221-7/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: xtensa_sigaction doesn't existAl Viro2012-05-222-9/+0
| | | | | | ... and struct old_sigaction never used Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* alpha: tidy signal delivery upAl Viro2012-05-221-43/+26
| | | | | | | | | | * move force_sigsegv() (from setup...frame()) and clearing RESTART_SIGMASK (from do_signal()) into hanlde_signal() * get rid of handle_signal() return value and oldset argument * checking for TIF_SIGPENDING is enough; set_restart_sigmask() sets this one as well. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* score: don't open-code force_sigsegv()Al Viro2012-05-221-3/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cris: don't open-code force_sigsegv()Al Viro2012-05-221-8/+2
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* blackfin: don't open-code force_sigsegv()Al Viro2012-05-221-3/+1
| | | | | | | ... especially since we don't have the right k_sigaction here, so resetting sa_handler won't work. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* avr32: need to clear RESTORE_SIGMASK on successful signal deliveryAl Viro2012-05-221-0/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: bury sys_rt_sigsuspend_wrapper in nommu case tooAl Viro2012-05-221-4/+0
| | | | | | | | | | | | | | It's been a dead code since commit 571202f50fad0aeb36661c79de9beed052347df8 Author: Michal Simek <monstr@monstr.eu> Date: Fri Dec 11 12:54:04 2009 +0100 microblaze: Remove rt_sigsuspend wrapper Generic rt_sigsuspend syscalls doesn't need any asm wrapper. but that commit has only removed it from entry.S, missing one in entry-nommu.S. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cris: SA_ONESHOT handling is done by get_signal_to_deliver()Al Viro2012-05-221-3/+0
| | | | | | | ... and resetting sa_handler in local copy filled by get_signal_to_deliver() is obviously pointless anyway. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* h8300: switch to saved_sigmask-based sigsuspend/rt_sigsuspendAl Viro2012-05-223-59/+21
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* h8300: don't change blocked signals' mask if setting frame up failsAl Viro2012-05-221-7/+11
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* sh: switch to saved_sigmask-based sigsuspend()/rt_sigsuspend()Al Viro2012-05-224-71/+13
| | | | | | | | | Complete the move of sh64 to it, trim the crap from prototypes, tidy up a bit. Infrastructure in do_signal() had already been there, in signal_64 as well as in signal_32 (where it was already used). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: switch to generic rt_sigsuspend(2)Al Viro2012-05-224-43/+16
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* avr32: ->restart_block.fn needs to be reset on rt_sigreturnAl Viro2012-05-221-0/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xtensa: ->restart_block.fn needs to be reset on rt_sigreturnAl Viro2012-05-221-0/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* score: ->restart_block.fn needs to be reset on rt_sigreturnAl Viro2012-05-221-0/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: ->restart_block.fn needs to be reset on rt_sigreturnAl Viro2012-05-221-0/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hexagon: ->restart_block.fn needs to be reset on rt_sigreturnAl Viro2012-05-221-0/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* c6x: ->restart_block.fn needs to be reset on rt_sigreturnAl Viro2012-05-221-0/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* parisc: resetting ->restart_block.fn needs to be done on rt_sigreturn()Al Viro2012-05-221-2/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m68k: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-8/+3
| | | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hexagon: do_notify_resume() needs tracehook_notify_resume()Oleg Nesterov2012-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | arch/hexagon/kernel/signal.c:do_notify_resume() forgets to call tracehook_notify_resume() if TIF_NOTIFY_RESUME is set. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Richard Kuo <rkuo@codeaurora.org> Cc: David Howells <dhowells@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alexander Gordeev <agordeev@redhat.com> Cc: Chris Zankel <chris@zankel.net> Cc: David Smith <dsmith@redhat.com> Cc: "Frank Ch. Eigler" <fche@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Larry Woodman <lwoodman@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* avr32: use block_sigmask()Matt Fleming2012-05-221-5/+1
| | | | | | | | | | | | | | | | | | Use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Havard Skinnemoen <hskinnemoen@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturnOleg Nesterov2012-05-221-10/+5
| | | | | | | | | | | | | It is wrong to change ->blocked directly, see e6fa16ab. Change handle_signal() and sys_rt_sigreturn() to use the right helper, set_current_blocked(). Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> Reviewed-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* avr32: don't mask signals in the error pathMatt Fleming2012-05-221-13/+12
| | | | | | | | | | | | | | | | | The current handle_signal() implementation is broken - it will mask signals if we fail to setup the signal stack frame, which isn't the desired behaviour, we should only be masking signals if we succeed in setting up the stack frame. It looks like this code was copied from the old (broken) arm implementation but wasn't updated when the arm code was fixed in commit a6c61e9dfdd0 ("[ARM] 3168/1: Update ARM signal delivery and masking"). Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* m32r: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-10/+2
| | | | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Kyle McMartin <kyle@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* mn10300: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-17/+4
| | | | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cris: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-222-38/+9
| | | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Mikael Starvik <starvik@axis.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ia64: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-13/+2
| | | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-10/+2
| | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: fix signal maskingMatt Fleming2012-05-221-13/+18
| | | | | | | | | | | | | | | | | | There are a couple of problems with the current signal code, 1. If we failed to setup the signal stack frame then we should not be masking any signals. 2. ka->sa.sa_mask is only added to the current blocked signals list if SA_NODEFER is set in ka->sa.sa_flags. If we successfully setup the signal frame and are going to run the handler then we must honour sa_mask. Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: no need to reset handler if SA_ONESHOTMatt Fleming2012-05-221-3/+0
| | | | | | | | | | | | | | get_signal_to_deliver() already resets the signal handler if SA_ONESHOT is set in ka->sa.sa_flags, there's no need to do it again in handle_signal(). Furthermore, because we were modifying ka->sa.sa_handler (which is a copy of sighand->action[]) instead of sighand->action[] the original code actually had no effect on signal delivery. Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* microblaze: don't reimplement force_sigsegv()Matt Fleming2012-05-221-3/+1
| | | | | | | | | | | | | | | | Instead of open coding the sequence from force_sigsegv() just call it. This also fixes a bug because we were modifying ka->sa.sa_handler (which is a copy of sighand->action[]), whereas the intention of the code was to modify sighand->action[] directly. As the original code was working with a copy it had no effect on signal delivery. Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* score: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-12/+3
| | | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Cc: Lennox Wu <lennox.wu@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* score: don't mask signals if we fail to setup signal stackMatt Fleming2012-05-221-6/+8
| | | | | | | | | | | | If setup_rt_frame() returns -EFAULT then we must not block any signals in the current process. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Cc: Lennox Wu <lennox.wu@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* h8300: use set_current_blocked() and block_sigmask()Matt Fleming2012-05-221-24/+9
| | | | | | | | | | | | | | | | | | | | As described in e6fa16ab ("signal: sigprocmask() should do retarget_shared_pending()") the modification of current->blocked is incorrect as we need to check whether the signal we're about to block is pending in the shared queue. Also, use the new helper function introduced in commit 5e6292c0f28f ("signal: add block_sigmask() for adding sigmask to current->blocked") which centralises the code for updating current->blocked after successfully delivering a signal and reduces the amount of duplicate code across architectures. In the past some architectures got this code wrong, so using this helper function should stop that from happening again. Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>