函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\rtmutex-debug.c Create Date:2022-07-27 10:53:05
Last Modify:2020-03-17 14:29:42 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:debug_rt_mutex_print_deadlock

函数原型:void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter)

返回类型:void

参数:

类型参数名称
struct rt_mutex_waiter *waiter
91  如果非deadlock_lock或非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则返回
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, 单一进程)
96  如果非task
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  返回
101  如果非Generic 'turn off all lock debugging' function:
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  返回
106  打印警告信息("\n")
107  打印警告信息("============================================\n")
108  打印警告信息("WARNING: circular locking deadlock detected!\n")
109  打印警告信息("%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  打印警告信息("--------------------------------------------\n")
111  printk("%s/%d is deadlocking current task %s/%d\n\n", 是否使用FPU, task_pid_nr(task), comm, task_pid_nr(当前进程))
115  printk("\n1) %s/%d is trying to acquire this lock:\n", comm, task_pid_nr(当前进程))
117  printk_lock(lock, 1)
119  printk("\n2) %s/%d is blocked on this lock:\n", 是否使用FPU, 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", 是否使用FPU, task_pid_nr(task))
128  show_stack(task, NULL)
129  printk("\n%s/%d's [current] stackdump:\n\n", comm, task_pid_nr(当前进程))
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")
调用者
名称描述
__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