Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid_namespace.c Create Date:2022-07-28 11:20:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:zap_pid_ns_processes

Proto:void zap_pid_ns_processes(struct pid_namespace *pid_ns)

Type:void

Parameter:

TypeParameterName
struct pid_namespace *pid_ns
183  me = current process
184  init_pids = If thread_group_leader(me) Then 1 Else 2
188  disable_pid_allocation(pid_ns)
195  spin_lock_irq( & siglock)
196  sa_handler = gnore signal
197  spin_unlock_irq( & siglock)
212  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
213  read_lock( & tasklist_lock)
214  nr = 2
216  task = pid_task(pid, PIDTYPE_PID)
217  If task && Not __fatal_signal_pending(task) Then send signal info to all the members of a group
220  read_unlock( & tasklist_lock)
221  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
228  Do
229  clear_thread_flag(signal pending )
230  rc = kernel_wait4( - 1, NULL, Wait on all children, regardless of type , NULL)
231  When rc != -ECHILD cycle
249  cycle
250  set_current_state(TASK_INTERRUPTIBLE)
251  If pid_allocated == init_pids Then Break
253  schedule()
255  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Used in tsk->state: )
257  If group exit code if this pidns was rebooted Then group_exit_code = group exit code if this pidns was rebooted
260  acct_exit_ns(pid_ns)
261  Return