diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-01 14:53:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-01 14:53:44 -0400 |
commit | 86c47b70f62a7072d441ba212aab33c2f82627c2 (patch) | |
tree | d03988bd2226966352bb7f3c2e82ff545353d2c4 /arch/sparc/include | |
parent | 1193755ac6328ad240ba987e6ec41d5e8baf0680 (diff) | |
parent | 44fbbb3dc687c9709a6f2236197316e5c79ab1eb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull third pile of signal handling patches from Al Viro:
"This time it's mostly helpers and conversions to them; there's a lot
of stuff remaining in the tree, but that'll either go in -rc2
(isolated bug fixes, ideally via arch maintainers' trees) or will sit
there until the next cycle."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
x86: get rid of calling do_notify_resume() when returning to kernel mode
blackfin: check __get_user() return value
whack-a-mole with TIF_FREEZE
FRV: Optimise the system call exit path in entry.S [ver #2]
FRV: Shrink TIF_WORK_MASK [ver #2]
FRV: Prevent syscall exit tracing and notify_resume at end of kernel exceptions
new helper: signal_delivered()
powerpc: get rid of restore_sigmask()
most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set
set_restore_sigmask() is never called without SIGPENDING (and never should be)
TIF_RESTORE_SIGMASK can be set only when TIF_SIGPENDING is set
don't call try_to_freeze() from do_signal()
pull clearing RESTORE_SIGMASK into block_sigmask()
sh64: failure to build sigframe != signal without handler
openrisc: tracehook_signal_handler() is supposed to be called on success
new helper: sigmask_to_save()
new helper: restore_saved_sigmask()
new helpers: {clear,test,test_and_clear}_restore_sigmask()
HAVE_RESTORE_SIGMASK is defined on all architectures now
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/thread_info_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_64.h | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 5af664932452..e6cd224506a9 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -131,8 +131,7 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
132 | 132 | ||
133 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ | 133 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ |
134 | _TIF_SIGPENDING | \ | 134 | _TIF_SIGPENDING) |
135 | _TIF_RESTORE_SIGMASK) | ||
136 | 135 | ||
137 | #endif /* __KERNEL__ */ | 136 | #endif /* __KERNEL__ */ |
138 | 137 | ||
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 7f0981b09451..cfa8c38fb9c8 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -238,7 +238,23 @@ static inline void set_restore_sigmask(void) | |||
238 | { | 238 | { |
239 | struct thread_info *ti = current_thread_info(); | 239 | struct thread_info *ti = current_thread_info(); |
240 | ti->status |= TS_RESTORE_SIGMASK; | 240 | ti->status |= TS_RESTORE_SIGMASK; |
241 | set_bit(TIF_SIGPENDING, &ti->flags); | 241 | WARN_ON(!test_bit(TIF_SIGPENDING, &ti->flags)); |
242 | } | ||
243 | static inline void clear_restore_sigmask(void) | ||
244 | { | ||
245 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; | ||
246 | } | ||
247 | static inline bool test_restore_sigmask(void) | ||
248 | { | ||
249 | return current_thread_info()->status & TS_RESTORE_SIGMASK; | ||
250 | } | ||
251 | static inline bool test_and_clear_restore_sigmask(void) | ||
252 | { | ||
253 | struct thread_info *ti = current_thread_info(); | ||
254 | if (!(ti->status & TS_RESTORE_SIGMASK)) | ||
255 | return false; | ||
256 | ti->status &= ~TS_RESTORE_SIGMASK; | ||
257 | return true; | ||
242 | } | 258 | } |
243 | #endif /* !__ASSEMBLY__ */ | 259 | #endif /* !__ASSEMBLY__ */ |
244 | 260 | ||