函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\coredump.c Create Date:2022-07-29 11:06:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:zap_threads

函数原型:static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, struct core_state *core_state, int exit_code)

返回类型:int

参数:

类型参数名称
struct task_struct *tsk
struct mm_struct *mm
struct core_state *core_state
intexit_code
365  nr等于负EAGAIN
367  spin_lock_irq( & siglock)
368  如果非If true, all threads except ->group_exit_task have pending SIGKILL
369  coredumping support 等于core_state
370  group_exit_task等于tsk
371  nr等于zap_process(tsk, exit_code, 0)
372  清除线程指定标志
374  spin_unlock_irq( & siglock)
375  如果此条件成立可能性小(为编译器优化)(nr < 0)则返回:nr
378  任务标志或等于Dumped core
379  如果atomic_read( & *@mm_users: The number of users including userspace. * Use mmget()/mmget_not_zero()/mmput() to modify. When this * drops to 0 (i.e. when the task exits and there are no other * temporary reference holders), we also release a reference on *@mm_count (which )恒等于nr加1则转到:done
411  _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
413  如果g恒等于线程组主管则继续下一循环
415  如果任务标志按位与I am a kernel thread 则继续下一循环
418  for_each_thread(g, p)
419  如果此条件成立可能性小(为编译器优化)(!内存信息)则继续下一循环
427  退出
430  _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()
431  done :
432  atomic_set( & nr_threads, nr)
433  返回:nr
调用者
名称描述
coredump_wait