diff options
Diffstat (limited to 'include/linux/sched/signal.h')
-rw-r--r-- | include/linux/sched/signal.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 532458698bde..efd8ce7675ed 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h | |||
@@ -15,10 +15,10 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | struct sighand_struct { | 17 | struct sighand_struct { |
18 | refcount_t count; | ||
19 | struct k_sigaction action[_NSIG]; | ||
20 | spinlock_t siglock; | 18 | spinlock_t siglock; |
19 | refcount_t count; | ||
21 | wait_queue_head_t signalfd_wqh; | 20 | wait_queue_head_t signalfd_wqh; |
21 | struct k_sigaction action[_NSIG]; | ||
22 | }; | 22 | }; |
23 | 23 | ||
24 | /* | 24 | /* |
@@ -420,7 +420,6 @@ void task_join_group_stop(struct task_struct *task); | |||
420 | static inline void set_restore_sigmask(void) | 420 | static inline void set_restore_sigmask(void) |
421 | { | 421 | { |
422 | set_thread_flag(TIF_RESTORE_SIGMASK); | 422 | set_thread_flag(TIF_RESTORE_SIGMASK); |
423 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
424 | } | 423 | } |
425 | 424 | ||
426 | static inline void clear_tsk_restore_sigmask(struct task_struct *task) | 425 | static inline void clear_tsk_restore_sigmask(struct task_struct *task) |
@@ -451,7 +450,6 @@ static inline bool test_and_clear_restore_sigmask(void) | |||
451 | static inline void set_restore_sigmask(void) | 450 | static inline void set_restore_sigmask(void) |
452 | { | 451 | { |
453 | current->restore_sigmask = true; | 452 | current->restore_sigmask = true; |
454 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
455 | } | 453 | } |
456 | static inline void clear_tsk_restore_sigmask(struct task_struct *task) | 454 | static inline void clear_tsk_restore_sigmask(struct task_struct *task) |
457 | { | 455 | { |
@@ -484,6 +482,16 @@ static inline void restore_saved_sigmask(void) | |||
484 | __set_current_blocked(¤t->saved_sigmask); | 482 | __set_current_blocked(¤t->saved_sigmask); |
485 | } | 483 | } |
486 | 484 | ||
485 | extern int set_user_sigmask(const sigset_t __user *umask, size_t sigsetsize); | ||
486 | |||
487 | static inline void restore_saved_sigmask_unless(bool interrupted) | ||
488 | { | ||
489 | if (interrupted) | ||
490 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); | ||
491 | else | ||
492 | restore_saved_sigmask(); | ||
493 | } | ||
494 | |||
487 | static inline sigset_t *sigmask_to_save(void) | 495 | static inline sigset_t *sigmask_to_save(void) |
488 | { | 496 | { |
489 | sigset_t *res = ¤t->blocked; | 497 | sigset_t *res = ¤t->blocked; |