aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-05 18:30:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-05 18:30:34 -0400
commit5d32c88f0b94061b3af2e3ade92422407282eb12 (patch)
tree2e1f81aa47b2cf59625c8fba17199617e33802e6 /arch/alpha/kernel
parent43f63c8711ce02226b7bbdafeba7b8031faf3fb4 (diff)
parentdac23b0d0513916498d40412818bd2c581b365f7 (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge batch of fixes from Andrew Morton: "The simple_open() cleanup was held back while I wanted for laggards to merge things. I still need to send a few checkpoint/restore patches. I've been wobbly about merging them because I'm wobbly about the overall prospects for success of the project. But after speaking with Pavel at the LSF conference, it sounds like they're further toward completion than I feared - apparently davem is at the "has stopped complaining" stage regarding the net changes. So I need to go back and re-review those patchs and their (lengthy) discussion." * emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches) memcg swap: use mem_cgroup_uncharge_swap fix backlight: add driver for DA9052/53 PMIC v1 C6X: use set_current_blocked() and block_sigmask() MAINTAINERS: add entry for sparse checker MAINTAINERS: fix REMOTEPROC F: typo alpha: use set_current_blocked() and block_sigmask() simple_open: automatically convert to simple_open() scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open() libfs: add simple_open() hugetlbfs: remove unregister_filesystem() when initializing module drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback fs/xattr.c:setxattr(): improve handling of allocation failures fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed fs/xattr.c: suppress page allocation failure warnings from sys_listxattr() sysrq: use SEND_SIG_FORCED instead of force_sig() proc: fix mount -t proc -o AAA
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/signal.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
index 6f7feb5db271..35f2ef44de12 100644
--- a/arch/alpha/kernel/signal.c
+++ b/arch/alpha/kernel/signal.c
@@ -120,12 +120,13 @@ SYSCALL_DEFINE5(rt_sigaction, int, sig, const struct sigaction __user *, act,
120 */ 120 */
121SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) 121SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask)
122{ 122{
123 mask &= _BLOCKABLE; 123 sigset_t blocked;
124 spin_lock_irq(&current->sighand->siglock); 124
125 current->saved_sigmask = current->blocked; 125 current->saved_sigmask = current->blocked;
126 siginitset(&current->blocked, mask); 126
127 recalc_sigpending(); 127 mask &= _BLOCKABLE;
128 spin_unlock_irq(&current->sighand->siglock); 128 siginitset(&blocked, mask);
129 set_current_blocked(&blocked);
129 130
130 current->state = TASK_INTERRUPTIBLE; 131 current->state = TASK_INTERRUPTIBLE;
131 schedule(); 132 schedule();
@@ -238,10 +239,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
238 goto give_sigsegv; 239 goto give_sigsegv;
239 240
240 sigdelsetmask(&set, ~_BLOCKABLE); 241 sigdelsetmask(&set, ~_BLOCKABLE);
241 spin_lock_irq(&current->sighand->siglock); 242 set_current_blocked(&set);
242 current->blocked = set;
243 recalc_sigpending();
244 spin_unlock_irq(&current->sighand->siglock);
245 243
246 if (restore_sigcontext(sc, regs, sw)) 244 if (restore_sigcontext(sc, regs, sw))
247 goto give_sigsegv; 245 goto give_sigsegv;
@@ -276,10 +274,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
276 goto give_sigsegv; 274 goto give_sigsegv;
277 275
278 sigdelsetmask(&set, ~_BLOCKABLE); 276 sigdelsetmask(&set, ~_BLOCKABLE);
279 spin_lock_irq(&current->sighand->siglock); 277 set_current_blocked(&set);
280 current->blocked = set;
281 recalc_sigpending();
282 spin_unlock_irq(&current->sighand->siglock);
283 278
284 if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw)) 279 if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw))
285 goto give_sigsegv; 280 goto give_sigsegv;
@@ -501,14 +496,8 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
501 else 496 else
502 ret = setup_frame(sig, ka, oldset, regs, sw); 497 ret = setup_frame(sig, ka, oldset, regs, sw);
503 498
504 if (ret == 0) { 499 if (ret == 0)
505 spin_lock_irq(&current->sighand->siglock); 500 block_sigmask(ka, sig);
506 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
507 if (!(ka->sa.sa_flags & SA_NODEFER))
508 sigaddset(&current->blocked,sig);
509 recalc_sigpending();
510 spin_unlock_irq(&current->sighand->siglock);
511 }
512 501
513 return ret; 502 return ret;
514} 503}