diff options
| author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-14 11:00:36 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-14 11:00:36 -0400 |
| commit | 277a163c83d7ba93fba1e8980d29a9f8bfcfba6c (patch) | |
| tree | ccfd357d152292958957b6b8a993892e7a8cc95f /kernel/locking/lockdep.c | |
| parent | a83b93a7480441a47856dc9104bea970e84cda87 (diff) | |
| parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) | |
Merge tag 'v3.15-rc1' into patchwork
Linux 3.15-rc1
* tag 'v3.15-rc1': (12180 commits)
Linux 3.15-rc1
mm: Initialize error in shmem_file_aio_read()
cifs: Use min_t() when comparing "size_t" and "unsigned long"
sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue
powerpc: Don't try to set LPCR unless we're in hypervisor mode
futex: update documentation for ordering guarantees
ceph: fix pr_fmt() redefinition
vti: don't allow to add the same tunnel twice
gre: don't allow to add the same tunnel twice
drivers: net: xen-netfront: fix array initialization bug
missing bits of "splice: fix racy pipe->buffers uses"
cifs: fix the race in cifs_writev()
ceph_sync_{,direct_}write: fix an oops on ceph_osdc_new_request() failure
pktgen: be friendly to LLTX devices
r8152: check RTL8152_UNPLUG
net: sun4i-emac: add promiscuous support
net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
blackfin: cleanup board files
bf609: clock: drop unused clock bit set/clear functions
Blackfin: bf537: rename "CONFIG_ADT75"
...
Diffstat (limited to 'kernel/locking/lockdep.c')
| -rw-r--r-- | kernel/locking/lockdep.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index eb8a54783fa0..b0e9467922e1 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c | |||
| @@ -1936,12 +1936,12 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next) | |||
| 1936 | 1936 | ||
| 1937 | for (;;) { | 1937 | for (;;) { |
| 1938 | int distance = curr->lockdep_depth - depth + 1; | 1938 | int distance = curr->lockdep_depth - depth + 1; |
| 1939 | hlock = curr->held_locks + depth-1; | 1939 | hlock = curr->held_locks + depth - 1; |
| 1940 | /* | 1940 | /* |
| 1941 | * Only non-recursive-read entries get new dependencies | 1941 | * Only non-recursive-read entries get new dependencies |
| 1942 | * added: | 1942 | * added: |
| 1943 | */ | 1943 | */ |
| 1944 | if (hlock->read != 2) { | 1944 | if (hlock->read != 2 && hlock->check) { |
| 1945 | if (!check_prev_add(curr, hlock, next, | 1945 | if (!check_prev_add(curr, hlock, next, |
| 1946 | distance, trylock_loop)) | 1946 | distance, trylock_loop)) |
| 1947 | return 0; | 1947 | return 0; |
| @@ -2098,7 +2098,7 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, | |||
| 2098 | * (If lookup_chain_cache() returns with 1 it acquires | 2098 | * (If lookup_chain_cache() returns with 1 it acquires |
| 2099 | * graph_lock for us) | 2099 | * graph_lock for us) |
| 2100 | */ | 2100 | */ |
| 2101 | if (!hlock->trylock && (hlock->check == 2) && | 2101 | if (!hlock->trylock && hlock->check && |
| 2102 | lookup_chain_cache(curr, hlock, chain_key)) { | 2102 | lookup_chain_cache(curr, hlock, chain_key)) { |
| 2103 | /* | 2103 | /* |
| 2104 | * Check whether last held lock: | 2104 | * Check whether last held lock: |
| @@ -2517,7 +2517,7 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark) | |||
| 2517 | 2517 | ||
| 2518 | BUG_ON(usage_bit >= LOCK_USAGE_STATES); | 2518 | BUG_ON(usage_bit >= LOCK_USAGE_STATES); |
| 2519 | 2519 | ||
| 2520 | if (hlock_class(hlock)->key == __lockdep_no_validate__.subkeys) | 2520 | if (!hlock->check) |
| 2521 | continue; | 2521 | continue; |
| 2522 | 2522 | ||
| 2523 | if (!mark_lock(curr, hlock, usage_bit)) | 2523 | if (!mark_lock(curr, hlock, usage_bit)) |
| @@ -2557,7 +2557,7 @@ static void __trace_hardirqs_on_caller(unsigned long ip) | |||
| 2557 | debug_atomic_inc(hardirqs_on_events); | 2557 | debug_atomic_inc(hardirqs_on_events); |
| 2558 | } | 2558 | } |
| 2559 | 2559 | ||
| 2560 | void trace_hardirqs_on_caller(unsigned long ip) | 2560 | __visible void trace_hardirqs_on_caller(unsigned long ip) |
| 2561 | { | 2561 | { |
| 2562 | time_hardirqs_on(CALLER_ADDR0, ip); | 2562 | time_hardirqs_on(CALLER_ADDR0, ip); |
| 2563 | 2563 | ||
| @@ -2610,7 +2610,7 @@ EXPORT_SYMBOL(trace_hardirqs_on); | |||
| 2610 | /* | 2610 | /* |
| 2611 | * Hardirqs were disabled: | 2611 | * Hardirqs were disabled: |
| 2612 | */ | 2612 | */ |
| 2613 | void trace_hardirqs_off_caller(unsigned long ip) | 2613 | __visible void trace_hardirqs_off_caller(unsigned long ip) |
| 2614 | { | 2614 | { |
| 2615 | struct task_struct *curr = current; | 2615 | struct task_struct *curr = current; |
| 2616 | 2616 | ||
| @@ -3055,9 +3055,6 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
| 3055 | int class_idx; | 3055 | int class_idx; |
| 3056 | u64 chain_key; | 3056 | u64 chain_key; |
| 3057 | 3057 | ||
| 3058 | if (!prove_locking) | ||
| 3059 | check = 1; | ||
| 3060 | |||
| 3061 | if (unlikely(!debug_locks)) | 3058 | if (unlikely(!debug_locks)) |
| 3062 | return 0; | 3059 | return 0; |
| 3063 | 3060 | ||
| @@ -3069,8 +3066,8 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
| 3069 | if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) | 3066 | if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) |
| 3070 | return 0; | 3067 | return 0; |
| 3071 | 3068 | ||
| 3072 | if (lock->key == &__lockdep_no_validate__) | 3069 | if (!prove_locking || lock->key == &__lockdep_no_validate__) |
| 3073 | check = 1; | 3070 | check = 0; |
| 3074 | 3071 | ||
| 3075 | if (subclass < NR_LOCKDEP_CACHING_CLASSES) | 3072 | if (subclass < NR_LOCKDEP_CACHING_CLASSES) |
| 3076 | class = lock->class_cache[subclass]; | 3073 | class = lock->class_cache[subclass]; |
| @@ -3138,7 +3135,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, | |||
| 3138 | hlock->holdtime_stamp = lockstat_clock(); | 3135 | hlock->holdtime_stamp = lockstat_clock(); |
| 3139 | #endif | 3136 | #endif |
| 3140 | 3137 | ||
| 3141 | if (check == 2 && !mark_irqflags(curr, hlock)) | 3138 | if (check && !mark_irqflags(curr, hlock)) |
| 3142 | return 0; | 3139 | return 0; |
| 3143 | 3140 | ||
| 3144 | /* mark it as used: */ | 3141 | /* mark it as used: */ |
| @@ -4191,7 +4188,7 @@ void debug_show_held_locks(struct task_struct *task) | |||
| 4191 | } | 4188 | } |
| 4192 | EXPORT_SYMBOL_GPL(debug_show_held_locks); | 4189 | EXPORT_SYMBOL_GPL(debug_show_held_locks); |
| 4193 | 4190 | ||
| 4194 | void lockdep_sys_exit(void) | 4191 | asmlinkage void lockdep_sys_exit(void) |
| 4195 | { | 4192 | { |
| 4196 | struct task_struct *curr = current; | 4193 | struct task_struct *curr = current; |
| 4197 | 4194 | ||
