函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid_namespace.c Create Date:2022-07-27 12:23:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:zap_pid_ns_processes

函数原型:void zap_pid_ns_processes(struct pid_namespace *pid_ns)

返回类型:void

参数:

类型参数名称
struct pid_namespace *pid_ns
183  me等于当前进程
184  init_pids等于如果thread_group_leader(me)则1否则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, 单一进程)
217  如果task且非__fatal_signal_pending(task)则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  循环
229  clear_thread_flag(signal pending )
230  rc等于kernel_wait4( - 1, NULL, Wait on all children, regardless of type , NULL)
231 rc不等于负ECHILD循环
249  循环
250  set_current_state(睡眠态)
251  如果pid_allocated恒等于init_pids退出
253  进程调度
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;* (就绪态)
257  如果 group exit code if this pidns was rebooted group_exit_code等于 group exit code if this pidns was rebooted
260  acct_exit_ns(pid_ns)
261  返回