From c6134ae40d7c5831f08105b21ee25a346914eac8 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 27 Jul 2011 12:49:44 -0700 Subject: [PATCH] --- yaml --- r: 260824 b: refs/heads/master c: c1095c6da518b0b64e724f629051fa67655cd8d9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/compat.c | 5 +---- trunk/kernel/signal.c | 17 +++++------------ 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index ab07aeb5d759..2c703f680b77 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 678624e401b0b7747762b5223fb23f86dcdacc93 +refs/heads/master: c1095c6da518b0b64e724f629051fa67655cd8d9 diff --git a/trunk/kernel/compat.c b/trunk/kernel/compat.c index 18197ae2d465..616c78197cca 100644 --- a/trunk/kernel/compat.c +++ b/trunk/kernel/compat.c @@ -992,11 +992,8 @@ asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, compat sigset_from_compat(&newset, &newset32); sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP)); - spin_lock_irq(¤t->sighand->siglock); current->saved_sigmask = current->blocked; - current->blocked = newset; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + set_current_blocked(&newset); current->state = TASK_INTERRUPTIBLE; schedule(); diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index d7f70aed1cc0..291c9700be75 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -3102,15 +3102,11 @@ SYSCALL_DEFINE0(sgetmask) SYSCALL_DEFINE1(ssetmask, int, newmask) { - int old; - - spin_lock_irq(¤t->sighand->siglock); - old = current->blocked.sig[0]; + int old = current->blocked.sig[0]; + sigset_t newset; - siginitset(¤t->blocked, newmask & ~(sigmask(SIGKILL)| - sigmask(SIGSTOP))); - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + siginitset(&newset, newmask & ~(sigmask(SIGKILL) | sigmask(SIGSTOP))); + set_current_blocked(&newset); return old; } @@ -3167,11 +3163,8 @@ SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize) return -EFAULT; sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP)); - spin_lock_irq(¤t->sighand->siglock); current->saved_sigmask = current->blocked; - current->blocked = newset; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + set_current_blocked(&newset); current->state = TASK_INTERRUPTIBLE; schedule();