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/powerpc | |
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/powerpc')
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 45eb998557f8..61f6aff25edc 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -204,10 +204,10 @@ static inline int get_old_sigaction(struct k_sigaction *new_ka, | |||
204 | 204 | ||
205 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 205 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
206 | __get_user(new_ka->sa.sa_handler, &act->sa_handler) || | 206 | __get_user(new_ka->sa.sa_handler, &act->sa_handler) || |
207 | __get_user(new_ka->sa.sa_restorer, &act->sa_restorer)) | 207 | __get_user(new_ka->sa.sa_restorer, &act->sa_restorer) || |
208 | __get_user(new_ka->sa.sa_flags, &act->sa_flags) || | ||
209 | __get_user(mask, &act->sa_mask)) | ||
208 | return -EFAULT; | 210 | return -EFAULT; |
209 | __get_user(new_ka->sa.sa_flags, &act->sa_flags); | ||
210 | __get_user(mask, &act->sa_mask); | ||
211 | siginitset(&new_ka->sa.sa_mask, mask); | 211 | siginitset(&new_ka->sa.sa_mask, mask); |
212 | return 0; | 212 | return 0; |
213 | } | 213 | } |
@@ -244,17 +244,8 @@ static inline int restore_general_regs(struct pt_regs *regs, | |||
244 | long sys_sigsuspend(old_sigset_t mask) | 244 | long sys_sigsuspend(old_sigset_t mask) |
245 | { | 245 | { |
246 | sigset_t blocked; | 246 | sigset_t blocked; |
247 | |||
248 | current->saved_sigmask = current->blocked; | ||
249 | |||
250 | mask &= _BLOCKABLE; | ||
251 | siginitset(&blocked, mask); | 247 | siginitset(&blocked, mask); |
252 | set_current_blocked(&blocked); | 248 | return sigsuspend(&blocked); |
253 | |||
254 | current->state = TASK_INTERRUPTIBLE; | ||
255 | schedule(); | ||
256 | set_restore_sigmask(); | ||
257 | return -ERESTARTNOHAND; | ||
258 | } | 249 | } |
259 | 250 | ||
260 | long sys_sigaction(int sig, struct old_sigaction __user *act, | 251 | long sys_sigaction(int sig, struct old_sigaction __user *act, |