函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_signal

函数原型:bool get_signal(struct ksignal *ksig)

返回类型:bool

参数:

类型参数名称
struct ksignal *ksig
2523  sighand等于sighand
2524  signal等于signal
2527  如果此条件成立可能性小(为编译器优化)(task_works)则task_work_run()
2530  如果此条件成立可能性小(为编译器优化)(uprobe_deny_signal())则返回:false
2538  try_to_freeze()
2540  relock :
2541  spin_lock_irq( & siglock)
2547  如果此条件成立可能性小(为编译器优化)(see SIGNAL_* flags below & SIGNAL_CLD_MASK)则
2550  如果see SIGNAL_* flags below 按位与SIGNAL_CLD_CONTINUEDwhy等于stopped child has continued
2552  否则why等于child has stopped
2555  see SIGNAL_* flags below 与等于SIGNAL_CLD_MASK的反
2557  spin_unlock_irq( & siglock)
2567  read_lock( & tasklist_lock)
2568  do_notify_parent_cldstop - notify parent of stopped/continued state change*@tsk: task reporting the state change*@for_ptracer: the notification is for ptracer*@why: CLD_{CONTINUED|STOPPED|TRAPPED} to report
2570  如果ptrace_reparented(group_leader)则do_notify_parent_cldstop - notify parent of stopped/continued state change*@tsk: task reporting the state change*@for_ptracer: the notification is for ptracer*@why: CLD_{CONTINUED|STOPPED|TRAPPED} to report
2573  read_unlock( & tasklist_lock)
2575  转到:relock
2579  如果If true, all threads except ->group_exit_task have pending SIGKILL
2580  si_signo等于signr等于SIGKILL
2581  sigdelset( & signal, SIGKILL)
2582  signal_deliver - called when a signal is delivered*@sig: signal number*@info: pointer to struct siginfo*@ka: pointer to struct k_sigaction* A 'sig' signal is delivered to current process with 'info' siginfo,* and it will be handled by 'ka'
2584  确定进程等待信号
2585  转到:fatal
2588  循环
2591  如果此条件成立可能性小(为编译器优化)(jobctl & JOBCTL_STOP_PENDING)且do_signal_stop - handle group stop for SIGSTOP and other stop signals*@signr: signr causing group stop if initiating* If %JOBCTL_STOP_PENDING is not set yet, initiate group stop with @signr* and participate in it则转到:relock
2597  如果jobctl按位与JOBCTL_TRAP_MASK
2603  转到:relock
2612  cgroup_leave_frozen(false)
2613  转到:relock
2622  signr等于dequeue_synchronous_signal( & info)
2623  如果非signrsignr等于Dequeue a signal and return the element to the caller, which is* expected to free it.* All callers have to hold the siglock.
2626  如果非signr退出
2630  signr等于ptrace_signal(signr, & info)
2631  如果非signr则继续下一循环
2635  ka等于action[signr - 1]
2638  signal_deliver - called when a signal is delivered*@sig: signal number*@info: pointer to struct siginfo*@ka: pointer to struct k_sigaction* A 'sig' signal is delivered to current process with 'info' siginfo,* and it will be handled by 'ka'
2640  如果sa_handler恒等于gnore signal 则继续下一循环
2642  如果sa_handler不等于default signal handling
2644  ka等于ka
2649  退出
2655  如果sig_kernel_ignore(signr)则继续下一循环
2668  如果此条件成立可能性小(为编译器优化)(see SIGNAL_* flags below & r init: ignore fatal signals )且非sig_kernel_only(signr)则继续下一循环
2672  如果sig_kernel_stop(signr)则
2683  如果signr不等于SIGSTOP
2688  如果is_current_pgrp_orphaned()则转到:relock
2691  spin_lock_irq( & siglock)
2696  转到:relock
2703  继续下一循环
2706  fatal :
2707  spin_unlock_irq( & siglock)
2708  如果此条件成立可能性小(为编译器优化)(cgroup_task_frozen(当前进程))则cgroup_leave_frozen(true)
2714  flags或等于Killed by a signal
2716  如果sig_kernel_coredump(signr)则
2728  do_coredump( & info)
2734  Take down every thread in the group. This is called by fatal signals* as well as by sys_exit_group (below).
2737  spin_unlock_irq( & siglock)
2739  sig等于signr
2740  返回:sig大于0
调用者
名称描述
do_signal信号处理入口