diff options
author | Dave Jones <davej@redhat.com> | 2006-09-29 05:00:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:13 -0400 |
commit | 99de055ac065e19ed69de961e97c6336a261b34e (patch) | |
tree | edc25ea5f39c09e4e273b8824f2306655d6f4726 /kernel/lockdep.c | |
parent | 2b33b4dcbe5e09e683eef281f72aef951e17061c (diff) |
[PATCH] lockdep: print kernel version
Lets do the same thing we do for oopses - print out the version in the
report. It's an extra line of output though. We could tack it on the end
of the INFO: lines, but that screws up Ingo's pretty output.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index c088e5542e84..df1c3594de31 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/stacktrace.h> | 36 | #include <linux/stacktrace.h> |
37 | #include <linux/debug_locks.h> | 37 | #include <linux/debug_locks.h> |
38 | #include <linux/irqflags.h> | 38 | #include <linux/irqflags.h> |
39 | #include <linux/utsname.h> | ||
39 | 40 | ||
40 | #include <asm/sections.h> | 41 | #include <asm/sections.h> |
41 | 42 | ||
@@ -515,6 +516,13 @@ print_circular_bug_entry(struct lock_list *target, unsigned int depth) | |||
515 | return 0; | 516 | return 0; |
516 | } | 517 | } |
517 | 518 | ||
519 | static void print_kernel_version(void) | ||
520 | { | ||
521 | printk("%s %.*s\n", system_utsname.release, | ||
522 | (int)strcspn(system_utsname.version, " "), | ||
523 | system_utsname.version); | ||
524 | } | ||
525 | |||
518 | /* | 526 | /* |
519 | * When a circular dependency is detected, print the | 527 | * When a circular dependency is detected, print the |
520 | * header first: | 528 | * header first: |
@@ -531,6 +539,7 @@ print_circular_bug_header(struct lock_list *entry, unsigned int depth) | |||
531 | 539 | ||
532 | printk("\n=======================================================\n"); | 540 | printk("\n=======================================================\n"); |
533 | printk( "[ INFO: possible circular locking dependency detected ]\n"); | 541 | printk( "[ INFO: possible circular locking dependency detected ]\n"); |
542 | print_kernel_version(); | ||
534 | printk( "-------------------------------------------------------\n"); | 543 | printk( "-------------------------------------------------------\n"); |
535 | printk("%s/%d is trying to acquire lock:\n", | 544 | printk("%s/%d is trying to acquire lock:\n", |
536 | curr->comm, curr->pid); | 545 | curr->comm, curr->pid); |
@@ -712,6 +721,7 @@ print_bad_irq_dependency(struct task_struct *curr, | |||
712 | printk("\n======================================================\n"); | 721 | printk("\n======================================================\n"); |
713 | printk( "[ INFO: %s-safe -> %s-unsafe lock order detected ]\n", | 722 | printk( "[ INFO: %s-safe -> %s-unsafe lock order detected ]\n", |
714 | irqclass, irqclass); | 723 | irqclass, irqclass); |
724 | print_kernel_version(); | ||
715 | printk( "------------------------------------------------------\n"); | 725 | printk( "------------------------------------------------------\n"); |
716 | printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] is trying to acquire:\n", | 726 | printk("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] is trying to acquire:\n", |
717 | curr->comm, curr->pid, | 727 | curr->comm, curr->pid, |
@@ -793,6 +803,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev, | |||
793 | 803 | ||
794 | printk("\n=============================================\n"); | 804 | printk("\n=============================================\n"); |
795 | printk( "[ INFO: possible recursive locking detected ]\n"); | 805 | printk( "[ INFO: possible recursive locking detected ]\n"); |
806 | print_kernel_version(); | ||
796 | printk( "---------------------------------------------\n"); | 807 | printk( "---------------------------------------------\n"); |
797 | printk("%s/%d is trying to acquire lock:\n", | 808 | printk("%s/%d is trying to acquire lock:\n", |
798 | curr->comm, curr->pid); | 809 | curr->comm, curr->pid); |
@@ -1375,6 +1386,7 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other, | |||
1375 | 1386 | ||
1376 | printk("\n=========================================================\n"); | 1387 | printk("\n=========================================================\n"); |
1377 | printk( "[ INFO: possible irq lock inversion dependency detected ]\n"); | 1388 | printk( "[ INFO: possible irq lock inversion dependency detected ]\n"); |
1389 | print_kernel_version(); | ||
1378 | printk( "---------------------------------------------------------\n"); | 1390 | printk( "---------------------------------------------------------\n"); |
1379 | printk("%s/%d just changed the state of lock:\n", | 1391 | printk("%s/%d just changed the state of lock:\n", |
1380 | curr->comm, curr->pid); | 1392 | curr->comm, curr->pid); |
@@ -1469,6 +1481,7 @@ print_usage_bug(struct task_struct *curr, struct held_lock *this, | |||
1469 | 1481 | ||
1470 | printk("\n=================================\n"); | 1482 | printk("\n=================================\n"); |
1471 | printk( "[ INFO: inconsistent lock state ]\n"); | 1483 | printk( "[ INFO: inconsistent lock state ]\n"); |
1484 | print_kernel_version(); | ||
1472 | printk( "---------------------------------\n"); | 1485 | printk( "---------------------------------\n"); |
1473 | 1486 | ||
1474 | printk("inconsistent {%s} -> {%s} usage.\n", | 1487 | printk("inconsistent {%s} -> {%s} usage.\n", |