Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:zap_threads

Proto:static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, struct core_state *core_state, int exit_code)

Type:int

Parameter:

TypeParameterName
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 Not If true, all threads except ->group_exit_task have pending SIGKILL Then
369  coredumping support = core_state
370  group_exit_task = tsk
371  nr = zap_process(tsk, exit_code, 0)
372  clear_tsk_thread_flag(tsk, signal pending )
374  spin_unlock_irq( & siglock)
375  If Value for the false possibility is greater at compile time(nr < 0) Then Return nr
378  Per task flags (PF_*), defined further below: |= Dumped core
379  If 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 Then Go to 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  If g == group_leader Then Continue
415  If Per task flags (PF_*), defined further below: & I am a kernel thread Then Continue
418  for_each_thread(g, p)
419  If Value for the false possibility is greater at compile time(!mm) Then Continue
427  Break
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  Return nr
Caller
NameDescribe
coredump_wait