Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kdb_send_sig - Allows kdb to send signals without exposing* signal internals. This function checks if the required locks are* available before calling the main signal code, to avoid kdb* deadlocks.

Proto:void kdb_send_sig(struct task_struct *t, int sig)

Type:void

Parameter:

TypeParameterName
struct task_struct *t
intsig
4589  If Not spin_trylock( & siglock) Then
4590  kdb_printf("Can't do kill command now.\nThe sigmask lock is held somewhere else in kernel, try again later\n")
4593  Return
4595  new_t = kdb_prev_t != t
4596  kdb_prev_t = t
4597  If run state != Used in tsk->state: && new_t Then
4598  spin_unlock( & siglock)
4599  kdb_printf("Process is not RUNNING, sending a signal from kdb risks deadlock\non the run queue locks. The signal has _not_ been sent.\nReissue the kill command if you want to risk the deadlock.\n")
4605  Return
4607  ret = send_signal(sig, SEND_SIG_PRIV, t, PIDTYPE_PID)
4608  spin_unlock( & siglock)
4609  If ret Then kdb_printf("Fail to deliver Signal %d to process %d.\n", sig, process id)
4612  Else kdb_printf("Signal %d is sent to process %d.\n", sig, process id)
Caller
NameDescribe
kdb_killkdb_kill - This function implements the 'kill' commands.