diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 21:11:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 21:11:45 -0400 |
commit | f9369910a6225b8d4892c3f20ae740a711cd5ace (patch) | |
tree | 8650ff79d7607bceb35509c028400ecf1c317de0 /arch/blackfin | |
parent | 05f144a0d5c2207a0349348127f996e104ad7404 (diff) | |
parent | 415d04d08fec74b226c92c1fb54ad117c9c6bac4 (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/blackfin')
-rw-r--r-- | arch/blackfin/kernel/signal.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/arch/blackfin/kernel/signal.c b/arch/blackfin/kernel/signal.c index d536f35d1f43..e5bbc1a5edc2 100644 --- a/arch/blackfin/kernel/signal.c +++ b/arch/blackfin/kernel/signal.c | |||
@@ -99,10 +99,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused) | |||
99 | goto badframe; | 99 | goto badframe; |
100 | 100 | ||
101 | sigdelsetmask(&set, ~_BLOCKABLE); | 101 | sigdelsetmask(&set, ~_BLOCKABLE); |
102 | spin_lock_irq(¤t->sighand->siglock); | 102 | set_current_blocked(&set); |
103 | current->blocked = set; | ||
104 | recalc_sigpending(); | ||
105 | spin_unlock_irq(¤t->sighand->siglock); | ||
106 | 103 | ||
107 | if (rt_restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) | 104 | if (rt_restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) |
108 | goto badframe; | 105 | goto badframe; |
@@ -213,9 +210,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info, | |||
213 | return 0; | 210 | return 0; |
214 | 211 | ||
215 | give_sigsegv: | 212 | give_sigsegv: |
216 | if (sig == SIGSEGV) | 213 | force_sigsegv(sig, current); |
217 | ka->sa.sa_handler = SIG_DFL; | ||
218 | force_sig(SIGSEGV, current); | ||
219 | return -EFAULT; | 214 | return -EFAULT; |
220 | } | 215 | } |
221 | 216 | ||
@@ -266,15 +261,9 @@ handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka, | |||
266 | /* set up the stack frame */ | 261 | /* set up the stack frame */ |
267 | ret = setup_rt_frame(sig, ka, info, oldset, regs); | 262 | ret = setup_rt_frame(sig, ka, info, oldset, regs); |
268 | 263 | ||
269 | if (ret == 0) { | 264 | if (ret == 0) |
270 | spin_lock_irq(¤t->sighand->siglock); | 265 | block_sigmask(ka, sig); |
271 | sigorsets(¤t->blocked, ¤t->blocked, | 266 | |
272 | &ka->sa.sa_mask); | ||
273 | if (!(ka->sa.sa_flags & SA_NODEFER)) | ||
274 | sigaddset(¤t->blocked, sig); | ||
275 | recalc_sigpending(); | ||
276 | spin_unlock_irq(¤t->sighand->siglock); | ||
277 | } | ||
278 | return ret; | 267 | return ret; |
279 | } | 268 | } |
280 | 269 | ||