Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\signal.c Create Date:2022-07-28 09:16:51
Last Modify:2020-03-17 13:28:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_signal

Proto:bool get_signal(struct ksignal *ksig)

Type:bool

Parameter:

TypeParameterName
struct ksignal *ksig
2523  sighand = sighand
2524  signal = signal
2527  If Value for the false possibility is greater at compile time(task_works) Then task_work_run()
2530  If Value for the false possibility is greater at compile time(uprobe_deny_signal()) Then Return false
2538  try_to_freeze()
2540  relock :
2541  spin_lock_irq( & siglock)
2547  If Value for the false possibility is greater at compile time(see SIGNAL_* flags below & SIGNAL_CLD_MASK) Then
2550  If see SIGNAL_* flags below & SIGNAL_CLD_CONTINUED Then why = stopped child has continued
2552  Else 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  If ptrace_reparented(group_leader) Then 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  Go to relock
2579  If If true, all threads except ->group_exit_task have pending SIGKILL Then
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  recalc_sigpending()
2585  Go to fatal
2588  cycle
2591  If Value for the false possibility is greater at compile time(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 Then Go to relock
2597  If jobctl & JOBCTL_TRAP_MASK Then
2603  Go to relock
2612  cgroup_leave_frozen(false)
2613  Go to relock
2622  signr = dequeue_synchronous_signal( & info)
2623  If Not signr Then signr = Dequeue a signal and return the element to the caller, which is* expected to free it.* All callers have to hold the siglock.
2626  If Not signr Then Break
2630  signr = ptrace_signal(signr, & info)
2631  If Not signr Then Continue
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  If sa_handler == gnore signal Then Continue
2644  ka = ka
2649  Break
2655  If sig_kernel_ignore(signr) Then Continue
2668  If Value for the false possibility is greater at compile time(see SIGNAL_* flags below & r init: ignore fatal signals ) && Not sig_kernel_only(signr) Then Continue
2672  If sig_kernel_stop(signr) Then
2683  If signr != SIGSTOP Then
2688  If is_current_pgrp_orphaned() Then Go to relock
2691  spin_lock_irq( & siglock)
2696  Go to relock
2703  Continue
2706  fatal :
2707  spin_unlock_irq( & siglock)
2708  If Value for the false possibility is greater at compile time(cgroup_task_frozen(current process)) Then cgroup_leave_frozen(true)
2714  flags |= Killed by a signal
2716  If sig_kernel_coredump(signr) Then
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  Return sig > 0