Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\rtmutex-debug.c Create Date:2022-07-28 09:52:50
Last Modify:2020-03-17 14:29:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:debug_rt_mutex_print_deadlock

Proto:void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter)

Type:void

Parameter:

TypeParameterName
struct rt_mutex_waiter *waiter
91  If Not deadlock_lock || Not We want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and Then Return
94  _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
95  task = pid_task(deadlock_task_pid, PIDTYPE_PID)
96  If Not task Then
97  _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()
98  Return
101  If Not Generic 'turn off all lock debugging' function: Then
102  _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()
103  Return
106  pr_warn("\n")
107  pr_warn("============================================\n")
108  pr_warn("WARNING: circular locking deadlock detected!\n")
109  pr_warn("%s\n", print_tainted - return a string to represent the kernel taint state.* For individual taint flag meanings, see Documentation/admin-guide/sysctl/kernel.rst* The string is overwritten by the next call to print_tainted(),* but is always NULL terminated.)
110  pr_warn("--------------------------------------------\n")
111  printk("%s/%d is deadlocking current task %s/%d\n\n", * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock(), task_pid_nr(task), comm, task_pid_nr(current process))
115  printk("\n1) %s/%d is trying to acquire this lock:\n", comm, task_pid_nr(current process))
117  printk_lock(lock, 1)
119  printk("\n2) %s/%d is blocked on this lock:\n", * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock(), task_pid_nr(task))
121  printk_lock(deadlock_lock, 1)
123  Careful: only use this function if you are sure that* the task cannot run in parallel!
124  Careful: only use this function if you are sure that* the task cannot run in parallel!
126  printk("\n%s/%d's [blocked] stackdump:\n\n", * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock(), task_pid_nr(task))
128  show_stack(task, NULL)
129  printk("\n%s/%d's [current] stackdump:\n\n", comm, task_pid_nr(current process))
131  dump_stack()
132  debug_show_all_locks()
133  _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()
135  printk("[ turning off deadlock detection.Please report this trace. ]\n\n")
Caller
NameDescribe
__rt_mutex_slowlock__rt_mutex_slowlock() - Perform the wait-wake-try-to-take loop*@lock: the rt_mutex to take*@state: the state the task should block in (TASK_INTERRUPTIBLE* or TASK_UNINTERRUPTIBLE)*@timeout: the pre-initialized and started timer, or NULL for none*@waiter:
__rt_mutex_start_proxy_lock__rt_mutex_start_proxy_lock() - Start lock acquisition for another task*@lock: the rt_mutex to take*@waiter: the pre-initialized rt_mutex_waiter*@task: the task to prepare* Starts the rt_mutex acquire; it enqueues the @waiter and does deadlock* detection