函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-27 10:15:37
Last Modify:2020-03-17 13:28:47 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__send_signal

函数原型:static int __send_signal(int sig, struct kernel_siginfo *info, struct task_struct *t, enum pid_type type, bool force)

返回类型:int

参数:

类型参数名称
intsig
struct kernel_siginfo *info
struct task_struct *t
enum pid_typetype
boolforce
1071  ret等于0
1073  assert_spin_locked( & siglock)
1075  result等于TRACE_SIGNAL_IGNORED
1076  如果非Handle magic process-wide effects of stop/continue signals则转到:ret
1079  pending等于如果type不等于单一进程shared_pending否则待处理信号
1085  result等于TRACE_SIGNAL_ALREADY_PENDING
1086  如果legacy_queue(pending, sig)则转到:ret
1089  result等于TRACE_SIGNAL_DELIVERED
1093  如果sig恒等于SIGKILL任务标志按位与I am a kernel thread 则转到:out_set
1105  如果sig小于These should not be considered constants from userland. override_rlimit等于is_si_special(info)或si_code大于等于0
1107  否则override_rlimit等于0
1110  q等于allocate a new signal queue record* - this may be called without locks if and only if t == current, otherwise an* appropriate lock must be held to stop the target task from exiting
1111  如果q
1112  添加链表项
1115  clear_siginfo( & info)
1116  si_signo等于sig
1117  si_errno等于0
1126  退出
1127  :info恒等于SEND_SIG_PRIV
1128  clear_siginfo( & info)
1129  si_signo等于sig
1130  si_errno等于0
1132  si_pid等于0
1133  si_uid等于0
1134  退出
1135  默认
1136  copy_siginfo( & info, info)
1137  退出
1139  否则如果非is_si_special(info)且sig大于等于These should not be considered constants from userland. si_code不等于sent by kill, sigsend, raise
1146  result等于TRACE_SIGNAL_OVERFLOW_FAIL
1147  ret等于负EAGAIN
1148  转到:ret
1149  否则
1154  result等于TRACE_SIGNAL_LOSE_INFO
1157  out_set :
1158  Deliver the signal to listening signalfd.
1159  We don't use for these because there is no need tobe atomic.
1162  如果type大于PIDTYPE_TGID
1165  signal等于signal
1167  如果sig恒等于SIGCONTsigdelsetmask(signal, SIG_KERNEL_STOP_MASK)
1169  否则如果sig_kernel_stop(sig)则sigdelset(signal, SIGCONT)
1171  We don't use for these because there is no need tobe atomic.
1175  complete_signal(sig, t, type)
1176  ret :
1177  signal_generate - called when a signal is generated*@sig: signal number*@info: pointer to struct siginfo*@task: pointer to struct task_struct*@group: shared or private*@result: TRACE_SIGNAL_** Current process sends a 'sig' signal to 'task' process with
1178  返回:ret
调用者
名称描述
send_signal
kill_pid_usb_asyncioThe usb asyncio usage of siginfo is wrong