diff options
author | Oleg Nesterov <oleg@redhat.com> | 2011-07-27 15:49:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-27 15:53:36 -0400 |
commit | c1095c6da518b0b64e724f629051fa67655cd8d9 (patch) | |
tree | 8c2e33ca6c8e3caa71437c3b69b36a8cf03b4f08 /kernel/compat.c | |
parent | 678624e401b0b7747762b5223fb23f86dcdacc93 (diff) |
signals: sys_ssetmask/sys_rt_sigsuspend should use set_current_blocked()
sys_ssetmask(), sys_rt_sigsuspend() and compat_sys_rt_sigsuspend()
change ->blocked directly. This is not correct, see the changelog in
e6fa16ab "signal: sigprocmask() should do retarget_shared_pending()"
Change them to use set_current_blocked().
Another change is that now we are doing ->saved_sigmask = ->blocked
lockless, it doesn't make any sense to do this under ->siglock.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Matt Fleming <matt.fleming@linux.intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/compat.c')
-rw-r--r-- | kernel/compat.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 18197ae2d465..616c78197cca 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -992,11 +992,8 @@ asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, compat | |||
992 | sigset_from_compat(&newset, &newset32); | 992 | sigset_from_compat(&newset, &newset32); |
993 | sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP)); | 993 | sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP)); |
994 | 994 | ||
995 | spin_lock_irq(¤t->sighand->siglock); | ||
996 | current->saved_sigmask = current->blocked; | 995 | current->saved_sigmask = current->blocked; |
997 | current->blocked = newset; | 996 | set_current_blocked(&newset); |
998 | recalc_sigpending(); | ||
999 | spin_unlock_irq(¤t->sighand->siglock); | ||
1000 | 997 | ||
1001 | current->state = TASK_INTERRUPTIBLE; | 998 | current->state = TASK_INTERRUPTIBLE; |
1002 | schedule(); | 999 | schedule(); |