19 #include <linux/sched.h>
21 #include <linux/export.h>
40 static void printk_lock(
struct rt_mutex *
lock,
int print_owner)
47 lock, lock->file, lock->line);
49 if (print_owner && rt_mutex_owner(lock)) {
52 printk_task(rt_mutex_owner(lock));
76 task = rt_mutex_owner(act_waiter->
lock);
78 act_waiter->deadlock_task_pid = get_pid(task_pid(task));
79 act_waiter->deadlock_lock = lock;
102 printk(
"\n============================================\n");
103 printk(
"[ BUG: circular locking deadlock detected! ]\n");
105 printk(
"--------------------------------------------\n");
106 printk(
"%s/%d is deadlocking current task %s/%d\n\n",
107 task->
comm, task_pid_nr(task),
110 printk(
"\n1) %s/%d is trying to acquire this lock:\n",
112 printk_lock(waiter->
lock, 1);
114 printk(
"\n2) %s/%d is blocked on this lock:\n",
115 task->
comm, task_pid_nr(task));
116 printk_lock(waiter->deadlock_lock, 1);
121 printk(
"\n%s/%d's [blocked] stackdump:\n\n",
122 task->
comm, task_pid_nr(task));
124 printk(
"\n%s/%d's [current] stackdump:\n\n",
130 printk(
"[ turning off deadlock detection."
131 "Please report this trace. ]\n\n");
155 memset(waiter, 0x11,
sizeof(*waiter));
158 waiter->deadlock_task_pid =
NULL;
163 put_pid(waiter->deadlock_task_pid);
166 memset(waiter, 0x22,
sizeof(*waiter));