diff options
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 1aa91fd6b06e..dbda475b13bd 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -875,11 +875,11 @@ static int add_lock_to_list(struct lock_class *class, struct lock_class *this, | |||
875 | if (!entry) | 875 | if (!entry) |
876 | return 0; | 876 | return 0; |
877 | 877 | ||
878 | entry->class = this; | ||
879 | entry->distance = distance; | ||
880 | if (!save_trace(&entry->trace)) | 878 | if (!save_trace(&entry->trace)) |
881 | return 0; | 879 | return 0; |
882 | 880 | ||
881 | entry->class = this; | ||
882 | entry->distance = distance; | ||
883 | /* | 883 | /* |
884 | * Since we never remove from the dependency list, the list can | 884 | * Since we never remove from the dependency list, the list can |
885 | * be walked lockless by other CPUs, it's only allocation | 885 | * be walked lockless by other CPUs, it's only allocation |
@@ -1759,11 +1759,10 @@ static void check_chain_key(struct task_struct *curr) | |||
1759 | hlock = curr->held_locks + i; | 1759 | hlock = curr->held_locks + i; |
1760 | if (chain_key != hlock->prev_chain_key) { | 1760 | if (chain_key != hlock->prev_chain_key) { |
1761 | debug_locks_off(); | 1761 | debug_locks_off(); |
1762 | printk("hm#1, depth: %u [%u], %016Lx != %016Lx\n", | 1762 | WARN(1, "hm#1, depth: %u [%u], %016Lx != %016Lx\n", |
1763 | curr->lockdep_depth, i, | 1763 | curr->lockdep_depth, i, |
1764 | (unsigned long long)chain_key, | 1764 | (unsigned long long)chain_key, |
1765 | (unsigned long long)hlock->prev_chain_key); | 1765 | (unsigned long long)hlock->prev_chain_key); |
1766 | WARN_ON(1); | ||
1767 | return; | 1766 | return; |
1768 | } | 1767 | } |
1769 | id = hlock->class_idx - 1; | 1768 | id = hlock->class_idx - 1; |
@@ -1778,11 +1777,10 @@ static void check_chain_key(struct task_struct *curr) | |||
1778 | } | 1777 | } |
1779 | if (chain_key != curr->curr_chain_key) { | 1778 | if (chain_key != curr->curr_chain_key) { |
1780 | debug_locks_off(); | 1779 | debug_locks_off(); |
1781 | printk("hm#2, depth: %u [%u], %016Lx != %016Lx\n", | 1780 | WARN(1, "hm#2, depth: %u [%u], %016Lx != %016Lx\n", |
1782 | curr->lockdep_depth, i, | 1781 | curr->lockdep_depth, i, |
1783 | (unsigned long long)chain_key, | 1782 | (unsigned long long)chain_key, |
1784 | (unsigned long long)curr->curr_chain_key); | 1783 | (unsigned long long)curr->curr_chain_key); |
1785 | WARN_ON(1); | ||
1786 | } | 1784 | } |
1787 | #endif | 1785 | #endif |
1788 | } | 1786 | } |
@@ -2584,7 +2582,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
2584 | hlock->trylock = trylock; | 2582 | hlock->trylock = trylock; |
2585 | hlock->read = read; | 2583 | hlock->read = read; |
2586 | hlock->check = check; | 2584 | hlock->check = check; |
2587 | hlock->hardirqs_off = hardirqs_off; | 2585 | hlock->hardirqs_off = !!hardirqs_off; |
2588 | #ifdef CONFIG_LOCK_STAT | 2586 | #ifdef CONFIG_LOCK_STAT |
2589 | hlock->waittime_stamp = 0; | 2587 | hlock->waittime_stamp = 0; |
2590 | hlock->holdtime_stamp = sched_clock(); | 2588 | hlock->holdtime_stamp = sched_clock(); |
@@ -3031,7 +3029,7 @@ found_it: | |||
3031 | 3029 | ||
3032 | stats = get_lock_stats(hlock_class(hlock)); | 3030 | stats = get_lock_stats(hlock_class(hlock)); |
3033 | if (point < ARRAY_SIZE(stats->contention_point)) | 3031 | if (point < ARRAY_SIZE(stats->contention_point)) |
3034 | stats->contention_point[i]++; | 3032 | stats->contention_point[point]++; |
3035 | if (lock->cpu != smp_processor_id()) | 3033 | if (lock->cpu != smp_processor_id()) |
3036 | stats->bounces[bounce_contended + !!hlock->read]++; | 3034 | stats->bounces[bounce_contended + !!hlock->read]++; |
3037 | put_lock_stats(stats); | 3035 | put_lock_stats(stats); |