Lines Matching refs:sig
910 static inline void free_signal_struct(struct signal_struct *sig) in free_signal_struct() argument
912 taskstats_tgid_free(sig); in free_signal_struct()
913 sched_autogroup_exit(sig); in free_signal_struct()
918 if (sig->oom_mm) in free_signal_struct()
919 mmdrop_async(sig->oom_mm); in free_signal_struct()
920 kmem_cache_free(signal_cachep, sig); in free_signal_struct()
923 static inline void put_signal_struct(struct signal_struct *sig) in put_signal_struct() argument
925 if (refcount_dec_and_test(&sig->sigcnt)) in put_signal_struct()
926 free_signal_struct(sig); in put_signal_struct()
1749 struct sighand_struct *sig; in copy_sighand() local
1755 sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL); in copy_sighand()
1756 RCU_INIT_POINTER(tsk->sighand, sig); in copy_sighand()
1757 if (!sig) in copy_sighand()
1760 refcount_set(&sig->count, 1); in copy_sighand()
1762 memcpy(sig->action, current->sighand->action, sizeof(sig->action)); in copy_sighand()
1787 static void posix_cpu_timers_init_group(struct signal_struct *sig) in posix_cpu_timers_init_group() argument
1789 struct posix_cputimers *pct = &sig->posix_cputimers; in posix_cpu_timers_init_group()
1792 cpu_limit = READ_ONCE(sig->rlim[RLIMIT_CPU].rlim_cur); in posix_cpu_timers_init_group()
1798 struct signal_struct *sig; in copy_signal() local
1803 sig = kmem_cache_zalloc(signal_cachep, GFP_KERNEL); in copy_signal()
1804 tsk->signal = sig; in copy_signal()
1805 if (!sig) in copy_signal()
1808 sig->nr_threads = 1; in copy_signal()
1809 sig->quick_threads = 1; in copy_signal()
1810 atomic_set(&sig->live, 1); in copy_signal()
1811 refcount_set(&sig->sigcnt, 1); in copy_signal()
1814 sig->thread_head = (struct list_head)LIST_HEAD_INIT(tsk->thread_node); in copy_signal()
1815 tsk->thread_node = (struct list_head)LIST_HEAD_INIT(sig->thread_head); in copy_signal()
1817 init_waitqueue_head(&sig->wait_chldexit); in copy_signal()
1818 sig->curr_target = tsk; in copy_signal()
1819 init_sigpending(&sig->shared_pending); in copy_signal()
1820 INIT_HLIST_HEAD(&sig->multiprocess); in copy_signal()
1821 seqlock_init(&sig->stats_lock); in copy_signal()
1822 prev_cputime_init(&sig->prev_cputime); in copy_signal()
1825 INIT_LIST_HEAD(&sig->posix_timers); in copy_signal()
1826 hrtimer_init(&sig->real_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); in copy_signal()
1827 sig->real_timer.function = it_real_fn; in copy_signal()
1831 memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim); in copy_signal()
1834 posix_cpu_timers_init_group(sig); in copy_signal()
1836 tty_audit_fork(sig); in copy_signal()
1837 sched_autogroup_fork(sig); in copy_signal()
1839 sig->oom_score_adj = current->signal->oom_score_adj; in copy_signal()
1840 sig->oom_score_adj_min = current->signal->oom_score_adj_min; in copy_signal()
1842 mutex_init(&sig->cred_guard_mutex); in copy_signal()
1843 init_rwsem(&sig->exec_update_lock); in copy_signal()